1
skyqqcc 2018-11-04 23:41:22 +08:00
原谅我看不懂
|
2
meefly 2018-11-04 23:48:01 +08:00
1. 计算协方差 Cov = E[(R - mean_R)(P - mean_P)]
2. 计算方差 Var_R , Var_P 3. R^2 = Cov^2/abs(Var_R*Var_P) (注意是协方差的平方) |
3
meefly 2018-11-04 23:50:40 +08:00 1
没看到是 python,
from sklearn.metrics import r2_score r2 = r2_score(Real_Values , Predict_Values ) |
4
acone2003 OP 谢谢 meefly 大神!
|