2017-12-24 18 views
0

この関数を使用してPythonで分類器を検索する場合、GridSearchCV()は、フォーム1〜100を調整するパラメータの間隔を想像してください(1:100は機能しません) ??間隔を指定してGridSearchCVを使用する

答えて

1

これはGridSearchCV()関数に引数を渡すべきかです:

pipeline = Pipeline([ 
    ('clf', OneVsRestClassifier(SVC(), n_jobs=1)), 
]) 

parameters = [ 

    {'clf__estimator__kernel': ['rbf'], 
    'clf__estimator__gamma': [1e-3, 1e-4], 
    'clf__estimator__C': [1, 10] 
    }, 

    {'clf__estimator__kernel': ['poly'], 
    'clf__estimator__C': [1, 10] 
    } 
    ] 

grid_search_tune = GridSearchCV(pipeline, parameters, cv=2, n_jobs=3, verbose=10) 
関連する問題