【发布时间】:2018-09-24 12:51:51
【问题描述】:
因此,我以以下方式在集成管道中运行了一个非常彻底的 GridSearch,其中包含 10 倍交叉值-
pipeline_rf = Pipeline([
('standardize', MinMaxScaler()),
('grid_search_lr', GridSearchCV(
RandomForestClassifier(),
param_grid={'bootstrap': [True],
'max_depth': [50, 100, 150, 200],
'max_features': ['auto', 'sqrt'],
'min_samples_leaf': [1, 2, 4],
'min_samples_split': [2, 5, 10],
'n_estimators': [100, 200, 500, 1000, 1500]},
cv=10,
n_jobs=-1,
scoring='roc_auc',
verbose=2,
refit=True
))
])
pipeline_rf.fit(X_train, y_train)
我应该如何提取最佳参数集?
【问题讨论】:
-
如果答案有帮助,请接受 - 答案会占用受访者宝贵的时间...
标签: python-3.x scikit-learn pipeline random-forest grid-search