def estimate_accuracy(yEv, yEv_calc, disp = False):
"""
It was originally located in jchem. However now it is allocated here
since the functionality is more inline with jutil than jchem.
"""
r_sqr = metrics.r2_score( yEv, yEv_calc)
RMSE = np.sqrt( metrics.mean_squared_error( yEv, yEv_calc))
MAE = metrics.mean_absolute_error( yEv, yEv_calc)
DAE = metrics.median_absolute_error( yEv, yEv_calc)
if disp:
print("r^2={0:.2e}, RMSE={1:.2e}, MAE={2:.2e}, DAE={3:.2e}".format( r_sqr, RMSE, MAE, DAE))
return r_sqr, RMSE, MAE, DAE
评论列表
文章目录