<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">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="gmail-reference gmail-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"><code class="gmail-xref gmail-py gmail-py-class gmail-docutils gmail-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="gmail-pre" style="hyphens: none;">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>______________________________<wbr>_________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scikit-learn</a><br>
<br></blockquote></div><br></div>