sp_start.py 文件源码

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

项目:stock_trend_prediction 作者: r12543 项目源码 文件源码
def performGTBClass(X_train, y_train, X_test, y_test, fout, savemodel):
    """
    Gradient Tree Boosting binary Classification
    """
    clf = GradientBoostingClassifier(n_estimators=100)
    clf.fit(X_train, y_train)

    # if savemodel == True:
    #   fname_out = '{}-{}.pickle'.format(fout, datetime.now())
    #   with open(fname_out, 'wb') as f:
    #       cPickle.dump(clf, f, -1)

    accuracy = clf.score(X_test, y_test)

    print "GTBClass: ", accuracy
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号