scikit dummy logo scikit dummy: comparison

1 2 3 4
Notes

Let's run a dummy model in a gridsearch so we can compare with our original result.

pipe = Pipeline([
    ('scale', StandardScaler()),
    ('model', DummyClassifier())
])

grid = GridSearchCV(estimator=pipe,
                    param_grid={'model__strategy': ['stratified', 'most_frequent', 'uniform']},
                    cv=5,
                    scoring={'acc': make_scorer(accuracy_score)},
                    refit='acc',
                    return_train_score=True)

grid.fit(X, y);

To see the gridsearch results you can run;

pd.DataFrame(grid.cv_results_)[['param_model__strategy', 'mean_test_acc']]