python机器学习-糖尿病数据挖掘(博主录制)
https://study.163.com/course/courseMain.htm?courseId=1210198155&share=2&shareId=400000000398149
在sklearn中包含四种评价尺度,分别为mean_squared_error、mean_absolute_error、explained_variance_score 和 r2_score。
模型越好:r2→1
模型越差:r2→0
用法示例
from sklearn.metrics import r2_score y_true = [1,2,4] y_pred = [1.5,2.8,3.5]
print(r2_score(y_true,y_pred))
博主教学主页
https://study.163.com/provider/400000000398149/index.htm?share=2&shareId=400000000398149