【发布时间】:2019-09-17 06:47:32
【问题描述】:
我想交叉验证一个随机森林模型。我这样做了: 但我不知道如何适应它。
classifier= RandomForestClassifier(n_estimators=100, random_state=0)
from sklearn.model_selection import cross_val_score
val = cross_val_score(estimator=classifier, X=X_train, y=y_train, cv=5)
知道要使用交叉验证来填写模型吗
val.fit(X, y)
【问题讨论】:
标签: python python-3.6 random-forest cross-validation