with_csv.py 文件源码

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

项目:stock_trend_prediction 作者: r12543 项目源码 文件源码
def performAdaBoostClass(X_train, y_train, X_test, y_test, fout, savemodel):
    """
    Ada Boosting binary Classification
    """
    # n = parameters[0]
    # l =  parameters[1]
    clf = AdaBoostClassifier()
    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 "AdaBoost: ", accuracy
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号