Friday, 15 June 2012

machine learning - How to use the OneVsRestClassifier in Scikit-learn to analyse the performance of predicting each individual class with multi-class classification? -


In the OneVsRestClassifier documentation on the SciKit- learning website, it states the following:

"Since each class only Another is presented by a classifier, it is possible to obtain knowledge about the class by observing its related classifier. "

But it is not clear how to do it and I do not know This is how the methods of documentation on this page It may be obtained. I want to be able to print the accuracy of the model for each individual class, so that I can see the performance at every class's prediction.

I still have the code below, but I do not know where to go from here, because it seems there is nothing in the document, which tells how to do it. Any help is greatly appreciated. Def predict_one_vs_rest (self): clf = OneVsRestClassifier (LinearSVC (random_state = 0)) clf.fit (self.x, self.y) results = clf.classes_ estimators = clf.estimators_ print (Results) Print ("") Print (Estimator)

You can find the Rainier SSVP in OneVsRestClassifier There is no need to wrap, as is clearly stated, LinearSVC already supports multi-category classification. To observe the accuracy of the classes, you can use the illusion matrix or classification report, for example.


No comments:

Post a Comment