jskflow.py 文件源码

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

项目:jamespy_py3 作者: jskDr 项目源码 文件源码
def eval_score( model, X_test, y_test, string = "Test", graph = False):
    print()
    print(  "Evaluation of", string)
    print('--------')
    yP = model.predict(X_test)
    score_r2 = metrics.r2_score(y_test, yP)
    score_MedAE = metrics.median_absolute_error(y_test, yP)
    print('Accuracy')
    print('R2: {0:f}, MedAE: {1:f}'.format(score_r2, score_MedAE))
    print()

    if graph:
        kutil.regress_show4( y_test, yP)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号