plot_hyperopt.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:fluentopt 作者: mehdidc 项目源码 文件源码
def feval(d):
    max_depth = d['max_depth']
    n_estimators = d['n_estimators']
    clf = RandomForestClassifier(n_jobs=-1, max_depth=max_depth, n_estimators=n_estimators)
    scores = cross_val_score(clf, data_X, data_y, cv=5, scoring='accuracy')
    return np.mean(scores) - np.std(scores)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号