`# применение поиска по сетке для поиска наиболее эффективных параметров из sklearn.model_selection import GridSearchCV parameters = [{'C': [1, 10, 100, 1000], 'gamma': [0.1, 0.2,0.3, 0.5]}] grid_search = GridSearchCV (SV C (kernel = 'rbf'), параметры, cv = 5, n_jobs = -1) grid_search.fit (x_train, y_train)
ERROR:
/usr/local/lib/python3.6/dist-packages/joblib/externals/loky/process_executor.py:706: UserWarning: A
worker stopped while some jobs were given to the executor. This can be caused by a too short worker
timeout or by a memory leak.
"timeout or by a memory leak.", UserWarning
/usr/local/lib/python3.6/dist-packages/sklearn/utils/validation.py:760: DataConversionWarning: A
column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,
), for example using ravel().
y = column_or_1d(y, warn=True)
GridSearchCV(cv=5, error_score=nan,
estimator=SVC(C=1.0, break_ties=False, cache_size=200,
class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3,
gamma='scale', kernel='rbf', max_iter=-1,
probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False),
iid='deprecated', n_jobs=-1,
param_grid=[{'C': [1, 10, 100, 1000],
'gamma': [0.1, 0.2, 0.3, 0.5]}],
pre_dispatch='2*n_jobs', refit=True, return_train_score=False,
scoring=None, verbose=0)'