📅  最后修改于: 2022-03-11 14:56:46.610000             🧑  作者: Mango
clf = GridSearchCV(estimator=RandomForestClassifier(),
param_grid=parameter_candidates,
cv=5,
refit=True,
error_score=0,
n_jobs=-1)
clf.fit(training_set, training_classifications)
optimised_random_forest = clf.best_estimator_
return optimised_random_forest