模型的评估(Evaluation)指标

sklearn.metrics

一、回归问题
https://www.jianshu.com/p/9ee85fdad150

  1. MSE, Mean Squared Error), 均方误差,
    sklearn.metrics. mean_squared_error
  2. RMSE,Root Mean Squard Error,均方根误差
  3. MAE, Mean Absolute Error 平均绝对误差
    sklearn.metrics. mean_absolute_error
  4. R-Squared,
    sklearn.metrics. r2_score

二、分类问题
基础概念:

  1. True/False(事实的), Positives(正-阳)/Negatives(负-阴)(预测的)
  2. 混淆矩阵 confusion_matrix
_ 预测-Yes(P) 预测-No(N)
实际-Yes TP-真正,预测为正,实际为正 FN-假负,将正类预测为负类数→漏报 (Type II error)
实际-No FP-假正,将负类预测为正类数误报 (Type I error) TN-真负,预测为正,实际为负

指标:

  1. Accuracy 准确率:(TP+TN)/ALL
    accuracy_score
  2. precision, 精确率/精度/查准率 TP/ (TP+FP)
    2.recall, 召回率/查全率/真正例率tpr TP/ (TP+FN)
    recall_score
    3.f1-score, F值/综合评价指标,2TP/(2TP + FP + FN), F1值就是精确值和召回率的调和均值,P和R指标有的时候是矛盾的,综合考虑精确率(precision)和召回率(recall)这两个度量值。很容易理解,F1综合了P和R的结果,当F1较高时则比较说明实验方法比较理想
    4.ROC
    roc_curve
    5.AUC
    roc_auc_score
  3. 假正例率:FPR =FP/ (FP+TN)
    8、PR(Precision-Recall)曲线

metrics.classification_report

sklearn.metrics中的评估方法介绍(accuracy_score, recall_score, roc_curve, roc_auc_score, confusion_matrix)
https://blog.csdn.net/CherDW/article/details/55813071

三、排序问题
1.auc

  1. ndcg_score
    Normalized Discounted Cumulative Gain(归一化折损累计增益)
    NDCG用作排序结果的评价指标,评价排序的准确性。
  2. MAP(Mean Average Precision)平均精度均值。

1、准确率(Accuracy)
2、错误率(Error rate)
3、灵敏度/特效度(sensitive)

https://blog.csdn.net/quiet_girl/article/details/70830796
https://tracholar.github.io/machine-learning/2018/01/26/auc.html
https://blog.argcv.com/articles/1036.c
https://blog.csdn.net/quiet_girl/article/details/70830796

你可能感兴趣的:(模型的评估(Evaluation)指标)