DummyClassifier logo scikit dummy: dummyclassifier

1 2 3 4

Training a DummyClassifier

A dummy classifier works just like any other scikit-learn estimator.

from sklearn.dummy import DummyClassifier
mod = DummyClassifier(strategy="most_frequent")
mod.fit(X, y)

The benefit of this model is that it really meant as a "dumb"-model. If this model performs nearly as well as your best model ... then you know you something is up.