51
правка
Изменения
→Sklearn Grid search: использование
# Запуск поиска по сетке.
classifier = linear_model.SGDClassifier(random_state = 0, tol=1e-3)
grid_cv = model_selection.GridSearchCV(classifier, parameters_grid, scoring = 'accuracy', cv = cv)
grid_cv.fit(train_data, test_data)
Out:
GridSearchCV(cv=StratifiedShuffleSplit(n_splits=10, random_state=0, test_size=0.2, train_size=None),
pre_dispatch='2*n_jobs', refit=True, return_train_score=False,
scoring='accuracy', verbose=0)
=== Sklearn Grid search: важные атрибуты ===