【发布时间】:2023-02-09 20:56:41
【问题描述】:
cross_val = StratifiedKFold(n_splits=split_number)
index_iterator = cross_val.split(features_dataframe, classes_dataframe)
clf = RandomForestClassifier()
random_grid = _create_hyperparameter_finetuning_grid()
clf_random = RandomizedSearchCV(estimator = clf, param_distributions = random_grid, n_iter = 100, cv = cross_val,verbose=2, random_state=42, n_jobs = -1)
clf_random.fit(X, y)
我在某些网站上找到了这段用于随机搜索简历的代码。我不确定代码中的“random_grid = _create_hyperparameter_finetuning_grid()”是什么。 请赐教。
超参数调整
【问题讨论】:
标签: python python-3.x machine-learning jupyter-notebook random-forest