建模之常见模型评估指标(Keras, Sklearn, R)
发布日期:2022-02-14 23:02:55
浏览次数:45
分类:技术文章
本文共 3700 字,大约阅读时间需要 12 分钟。
相同算法请见
序号 | 概况 | 表达式 | 场景 | |||
---|---|---|---|---|---|---|
1 | 分类准确率 | 预测正确个数的占比 | 分类 | keras.metrics.Accuracyaccuracy | sklearn.metrics.accuracy_score | Accuracy |
2 | 二分类准确率 | 同上 | 分类 | keras.metrics.BinaryAccuracykeras.metrics.binary_accuracybinary_accuracy | ||
3 | 多分类准确率 | 同上 | 分类 | keras.metrics.CategoricalAccuracycategorical_accuracy | ||
4 | 目标在前K个预测中的频率 | keras.metrics.TopKCategoricalAccuracytop_k_categorical_accuracy | ||||
5 | 整数目标在前K个预测中的频率 | keras.metrics.SparseTopKCategoricalAccuracysparse_top_k_categorical_accuracy | ||||
6 | 交叉熵 | 同损失函数 | keras.metrics.BinaryCrossentropybinary_crossentropy | 同损失函数 | ||
7 | 交叉熵 | 同损失函数 | keras.metrics.CategoricalCrossentropycategorical_crossentropy | 同损失函数 | ||
8 | 交叉熵 | 同损失函数 | keras.metrics.SparseCategoricalCrossentropysparse_categorical_crossentropy | 同损失函数 | ||
9 | KL散度 | 同损失函数 | keras.metrics.KLDivergencekullback_leibler_divergence | 同损失函数 | ||
10 | poisson | 同损失函数 | keras.metrics.Poissonpoisson | 同损失函数 | ||
11 | mse | 同损失函数 | 回归 | keras.metrics.MeanSquaredErrormean_squared_error | 同损失函数 | |
12 | rmse | 同损失函数 | 回归 | keras.metrics.RootMeanSquaredErrorroot_mean_squared_error | 同损失函数 | |
13 | mae | 同损失函数 | 回归 | keras.metrics.MeanAbsoluteErrormean_absolute_error | 同损失函数 | |
14 | mape | 同损失函数 | 回归/时序 | keras.metrics.MeanAbsolutePercentageErrormean_absolute_percentage_error | 同损失函数 | |
15 | msle | 同损失函数 | 回归 | keras.metrics.MeanSquaredLogarithmicErrormean_squared_logarithmic_error | 同损失函数 | |
16 | 余弦相似度 | 同损失函数 | keras.metrics.CosineSimilaritycosine_similarity | 同损失函数 | ||
17 | 同损失函数 | keras.metrics.LogCoshErrorlogcosh | 同损失函数 | |||
18 | ∑ ( I ( p p o s , p n e g ) ) p o s × n e g \frac{\sum(I(p_{pos}, p_{neg}))}{pos \times neg} pos×neg∑(I(ppos,pneg)) i f p p o s > p n e g : I ( p p o s , p n e g ) = 1 if\ p_{pos} \gt p_{neg}: I(p_{pos}, p_{neg}) = 1 if ppos>pneg:I(ppos,pneg)=1 i f p p o s = p n e g : I ( p p o s , p n e g ) = 0.5 if\ p_{pos} = p_{neg}: I(p_{pos}, p_{neg}) = 0.5 if ppos=pneg:I(ppos,pneg)=0.5 i f p p o s < p n e g : I ( p p o s , p n e g ) = 0 if\ p_{pos} \lt p_{neg}: I(p_{pos}, p_{neg}) = 0 if ppos<pneg:I(ppos,pneg)=0 | 分类 | keras.metrics.AUC | sklearn.metrics.auc | AUC | |
19 | TP:正预测为正(预测正确) | 分类 | keras.metrics.TruePositives | |||
20 | TN:负预测为负(预测正确) | 分类 | keras.metrics.TrueNegatives | |||
21 | FP:负预测为正(预测错误) | 分类 | keras.metrics.FalsePositives | |||
22 | FN:正预测为负(预测错误) | 分类 | keras.metrics.FalseNegatives | |||
23 | :预测结果为正的准确率 | T P T P + F P \frac{TP}{TP + FP} TP+FPTP | 分类 | keras.metrics.Precision | sklearn.metrics.precision_score | Precision |
24 | :正样本预测的准确率 | T P T P + F N \frac{TP}{TP + FN} TP+FNTP | keras.metrics.Recall | sklearn.metrics.recall_score | Recall | |
25 | 特异度(specificity)/TNR:负样本预测的准确率 | T N T N + F P \frac{TN}{TN + FP } TN+FPTN | 分类 | |||
26 | 敏感度(sensitivity)/NPV:预测结果为负的准确率 | T N T N + F N \frac{TN}{TN + FN } TN+FNTN | 分类 | |||
27 | 召回率 >= recall时的准确率 | 分类 | keras.metrics.PrecisionAtRecall(recall) | sklearn.metrics.precision_recall_curve | ||
28 | 特异度 >= specificity时的敏感率 | 分类 | keras.metrics.SensitivityAtSpecificity(specificity) | |||
29 | 敏感度 >= sensitivity时的特异度 | 分类 | keras.metrics.SpecificityAtSensitivity(sensitivity) | |||
30 | , F β F_\beta Fβ的特殊形式( β = 1 \beta=1 β=1) | 2 × 准确率 × 召回率 准确率 + 召回率 \frac{2 \times \text{准确率} \times \text{召回率}}{\text{准确率} + \text{召回率}} 准确率+召回率2×准确率×召回率 | 分类 | sklearn.metrics.f1_score | F1_Score | |
31 | 1 − ∑ ( y − y ^ ) 2 ∑ ( y − y ‾ ) 2 1 - \frac{\sum(y - \hat{y})^2}{\sum(y - \overline{y})^2} 1−∑(y−y)2∑(y−y^)2 | 回归 | sklearn.metrics.r2_score | R2_Score | ||
32 | 召回率 + 特异度 2 \frac{\text{召回率} + \text{特异度}}{2} 2召回率+特异度 | 分类 | sklearn.metrics.balanced_accuracy_score | |||
33 | ( y ^ − y ) 2 ‾ \overline{(\hat{y} - y)^2} (y^−y)2 | 分类 | sklearn.metrics.brier_score_loss | |||
34 | ( 1 + β 2 ) × 准确率 × 召回率 β 2 × 准确率 + 召回率 \frac{(1 + \beta^2) \times \text{准确率} \times \text{召回率}}{\beta^2 \times \text{准确率} + \text{召回率}} β2×准确率+召回率(1+β2)×准确率×召回率 | 分类 | sklearn.metrics.fbeta_score | FBeta_Score | ||
35 | 分类 | sklearn.metrics.roc_curve | ||||
36 | 1 − Var ( y − y ^ ) Var ( y ) 1 - \frac{\text{Var}(y - \hat{y})}{\text{Var}(y)} 1−Var(y)Var(y−y^) | 回归 | sklearn.metrics.explained_variance_score |
转载地址:https://blog.csdn.net/fish2009122/article/details/108037833 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
很好
[***.229.124.182]2024年03月30日 06时15分18秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
SpringDataJPA入门及四种查询方式
2019-04-26
Spring Cloud Eureka & Spring Cloud Feign
2019-04-26
Spring Cloud Config & Spring Cloud Bus
2019-04-26
微服务容器部署与 jenkins 持续集成
2019-04-26
容器管理与容器监控
2019-04-26
java爬虫框架—WebMagic
2019-04-26
Java 基础之反射
2019-04-26
一起来学MySQL—常用内置函数
2019-04-26
Spring 核心 之 IOC
2019-04-26
一起来学MySQL—事务的隔离级别
2019-04-26
直连线和交叉线的区别
2019-04-26
数据库视频—使用.Net访问SQL Server
2019-04-26
数据库视频—总结
2019-04-26
简单工厂模式和策略模式的比较
2019-04-26
简单工厂、工厂方法、抽象工厂模式
2019-04-26
单例模式
2019-04-26
组合模式
2019-04-26
三层架构
2019-04-26
委托与事件(浅度分析)—委托
2019-04-26
委托与事件(浅度分析)—事件
2019-04-26