随机森林调参

随机森林调参
调参判断:

学习曲线
score_l = []
i = i_range = range(1,201,10)
for i in i_range:
rfc = RandomForestClassifier(n_estimators=i+1
,n_jobs = -1
,random_state=90)
score = cross_val_score(rfc,data.data,data.target,cv=10)
score_l.append(score.mean())

print(max(score_l),(score_l.index(max(score_l)) * 10) + 1)
plt.figure(figsize=[20,5])
plt.subplots(211)
plt.plot(i_range,score_l,label = ‘cross-vad-learning curve1’)
plt.legend()

网格搜索

随机森林调参

随机森林调参

随机森林调参
随机森林调参
随机森林调参