jutil.py 文件源码

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

项目:jamespy_py3 作者: jskDr 项目源码 文件源码
def mlr_val( RM, yE, disp = True, graph = True, rate = 2, more_train = True, center = None):
    """
    Validation is peformed as much as the given ratio.
    """
    RMt, yEt, RMv, yEv = jchem.get_valid_mode_data( RM, yE, rate = rate, more_train = more_train, center = center)

    clf = linear_model.LinearRegression()   
    clf.fit( RMt, yEt)

    print('Training result')
    mlr_show( clf, RMt, yEt, disp = disp, graph = graph)

    print('Validation result')
    r_sqr, RMSE = mlr_show( clf, RMv, yEv, disp = disp, graph = graph)

    return r_sqr, RMSE
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号