[scikit-learn] OneClassSvm | Different results on different runs
jaquesgrobler at gmail.com
Thu Aug 3 06:39:44 EDT 2017
The random_state parameter is used to generate a pseudo random number that
is used when shuffling your data for probability estimation
The seed of the pseudo random number generator to use when shuffling the
data for probability estimation.
A seed can be provided to control the shuffling for reproducible behavior.
Also, from the SVM docs
The underlying LinearSVC
> <http://scikit-learn.org/stable/modules/generated/sklearn.svm.LinearSVC.html#sklearn.svm.LinearSVC> 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 *tol *parameter.
Hope that helps
2017-08-03 12:15 GMT+02:00 Abhishek Raj via scikit-learn <
scikit-learn at python.org>:
> 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 random_state
> <http://scikit-learn.org/stable/modules/generated/sklearn.utils.check_random_state.html> parameter
> but I am not clear of the details.
> 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?
> scikit-learn mailing list
> scikit-learn at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scikit-learn