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
评论列表
文章目录