<div dir="ltr">Hi Abhishek,<div><br></div><div>Could you provide a small code snippet? I don't think the random_state parameter should influence the result of the OneClassSVM as there is no probability estimation for this estimator.</div><div><br></div><div>Albert<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 3, 2017 at 12:41 PM Jaques Grobler <<a href="mailto:jaquesgrobler@gmail.com">jaquesgrobler@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>The random_state parameter is used to generate a pseudo random number that is used when shuffling your data for probability estimation</div><br>The seed of the pseudo random number generator to use when shuffling the data for probability estimation.<br>A seed can be provided to control the shuffling for reproducible behavior.<div><span style="color:rgb(29,31,34);font-family:Helvetica,Arial,sans-serif;font-size:14.4px"><br></span></div><div><font color="#1d1f22" face="Helvetica, Arial, sans-serif"><span style="font-size:14.4px">Also, from the <a href="http://scikit-learn.org/stable/modules/svm.html#svm-outlier-detection" target="_blank">SVM docs</a></span></font></div><div><font color="#1d1f22" face="Helvetica, Arial, sans-serif"><span style="font-size:14.4px"><br></span></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(29,31,34);font-family:Helvetica,Arial,sans-serif;font-size:14.4px">The underlying </span><a class="m_5816139950685310951gmail-reference m_5816139950685310951gmail-internal" href="http://scikit-learn.org/stable/modules/generated/sklearn.svm.LinearSVC.html#sklearn.svm.LinearSVC" title="sklearn.svm.LinearSVC" style="color:rgb(40,120,162);text-decoration-line:none;word-wrap:break-word;font-family:Helvetica,Arial,sans-serif;font-size:14.4px" target="_blank"><code class="m_5816139950685310951gmail-xref m_5816139950685310951gmail-py m_5816139950685310951gmail-py-class m_5816139950685310951gmail-docutils m_5816139950685310951gmail-literal" style="padding:2px 4px;font-family:monospace;font-size:1.1em;color:inherit;border-radius:3px;background-color:transparent;border:none;white-space:nowrap;font-weight:bold"><span class="m_5816139950685310951gmail-pre">LinearSVC</span></code></a><span style="color:rgb(29,31,34);font-family:Helvetica,Arial,sans-serif;font-size:14.4px"> implementation uses a random number generator to select features when fitting the model. It is thus not uncommon, to have slightly different results for the same input data. If that happens, try with a smaller <b>tol </b>parameter.</span></blockquote><div><br></div><div>Hope that helps </div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-08-03 12:15 GMT+02:00 Abhishek Raj via scikit-learn <span dir="ltr"><<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am using one class svm for developing an anomaly detection model. I observed that different runs of training on the same data set outputs different accuracy. One run takes the accuracy as high as 98% and another run on the same data brings it down to 93%. Googling a little bit I found out that this is happening because of the <a href="http://scikit-learn.org/stable/modules/generated/sklearn.utils.check_random_state.html" target="_blank">random_state</a> parameter but I am not clear of the details.</div><div><br></div><div>Can anyone expand on how is the parameter exactly affecting my training and how I can figure out the best value to get the model with best accuracy?</div><div><br></div><div>Thanks,</div><div>Abhishek</div></div>
<br>_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</blockquote></div></div></div>