[模型评测]回归模型评测的4种方式

本文介绍了回归分析中常用的四种模型性能评价指标:平均绝对误差(MAE)、均方误差(MSE)、均方根误差(RMSE)和决定系数(R-Squared)。通过具体的例子展示了如何手动计算这些指标,并使用sklearn.metrics库进行验证,以评估模型预测的准确性和拟合优度。
摘要由CSDN通过智能技术生成

1.方式
MAE, MSE, RMSE, R-Squared

The MSE, MAE, RMSE, and R-Squared are mainly used metrics to evaluate the prediction error rates 
and model performance in regression analysis.
MAE (Mean absolute error) represents the difference between the original and predicted values 
    extracted by averaged the absolute difference over the data set.
MSE (Mean Squared Error) represents the difference between the original and predicted values 
    extracted by squared the average difference over the data set.
RMSE (Root Mean Squared Error) is the error rate by the square root of MSE.
R-squared (Coefficient of determination) represents the coefficient of how well the values fit compared 
to the original values. The value from 0 to 1 interpreted as percentages. The higher the value is, the better the model is.

2.准备数据
import numpy as np 
import sklearn.metrics as metrics
import ma

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值