July 2016
Beginner to intermediate
462 pages
9h 14m
English
The scikit-learn DummyClassifier class implements several strategies for random guessing, which can serve as a baseline for classifiers. The strategies are as follows:
stratified: This uses the training set class distributionmost_frequent: This predicts the most frequent classprior: This is available in scikit-learn 0.17 and predicts by maximizing the class prioruniform: This uses an uniform distribution to randomly sample classesconstant: This predicts a user-specified classAs you can see, some strategies of the DummyClassifier class always predict the same class. This can lead to warnings from some scikit-learn metrics functions. We will perform the same analysis as we did in the Computing precision, ...
Read now
Unlock full access