Learn Before
sklearn.dummy.DummyClassifier
Scikit-learn allows for dummy classifiers to be created for the purpose of comparing to a statistically generated model
dummy = DummyClassifier(strategy="most_frequent")
This code creates a dummy classifier which predicts every value to hold the same value as the most frequent value in the training set.
0
1
Tags
Data Science
Related
sklearn.preprocessing.OneHotEncoder
sklearn.neighbors.KNeighborsClassifier
sklearn.dummy.DummyClassifier
sklearn.preprocessing.LabelEncoder
Train Test Split Function
sklearn.datasets.make_regression
sklearn.datasets.make_friedman1
sklearn.datasets.make_classification
sklearn.svm.SVC
sklearn.tree.DecisionTreeClassifier
sklearn.ensemble.RandomForestClassifier
sklearn.dummy.DummyRegressor
sklearn.model_selection.GridSearchCV
sklearn.ensemble.RandomForestRegressor
Cross-Validation in scikit-learn