建模之常见模型评估指标(Keras, Sklearn, R)
发布日期:2022-02-14 23:02:55 浏览次数:45 分类:技术文章

本文共 3700 字,大约阅读时间需要 12 分钟。

相同算法请见

序号 概况 表达式 场景
1 分类准确率 预测正确个数的占比 分类 keras.metrics.Accuracy
accuracy
sklearn.metrics.accuracy_score Accuracy
2 二分类准确率 同上 分类 keras.metrics.BinaryAccuracy
keras.metrics.binary_accuracy
binary_accuracy
3 多分类准确率 同上 分类 keras.metrics.CategoricalAccuracy
categorical_accuracy
4 目标在前K个预测中的频率 keras.metrics.TopKCategoricalAccuracy
top_k_categorical_accuracy
5 整数目标在前K个预测中的频率 keras.metrics.SparseTopKCategoricalAccuracy
sparse_top_k_categorical_accuracy
6 交叉熵 同损失函数 keras.metrics.BinaryCrossentropy
binary_crossentropy
同损失函数
7 交叉熵 同损失函数 keras.metrics.CategoricalCrossentropy
categorical_crossentropy
同损失函数
8 交叉熵 同损失函数 keras.metrics.SparseCategoricalCrossentropy
sparse_categorical_crossentropy
同损失函数
9 KL散度 同损失函数 keras.metrics.KLDivergence
kullback_leibler_divergence
同损失函数
10 poisson 同损失函数 keras.metrics.Poisson
poisson
同损失函数
11 mse 同损失函数 回归 keras.metrics.MeanSquaredError
mean_squared_error
同损失函数
12 rmse 同损失函数 回归 keras.metrics.RootMeanSquaredError
root_mean_squared_error
同损失函数
13 mae 同损失函数 回归 keras.metrics.MeanAbsoluteError
mean_absolute_error
同损失函数
14 mape 同损失函数 回归/时序 keras.metrics.MeanAbsolutePercentageError
mean_absolute_percentage_error
同损失函数
15 msle 同损失函数 回归 keras.metrics.MeanSquaredLogarithmicError
mean_squared_logarithmic_error
同损失函数
16 余弦相似度 同损失函数 keras.metrics.CosineSimilarity
cosine_similarity
同损失函数
17 同损失函数 keras.metrics.LogCoshError
logcosh
同损失函数
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(yy)2(yy^)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)} 1Var(y)Var(yy^) 回归 sklearn.metrics.explained_variance_score

转载地址:https://blog.csdn.net/fish2009122/article/details/108037833 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:建模之常见激活函数(Keras,tf2)
下一篇:ClickHouse & OLAP

发表评论

最新留言

很好
[***.229.124.182]2024年03月30日 06时15分18秒