机器学习 - metric评估方法

有一些方法来评估classification model。

Metric name / Evaluation method Definition Code
Accuracy Out of 100 predictions, how many does your model get correct? E.g. 95% accuracy means it gets 95/100 predictions correct. torchmetrics.Accuracy() or sklearn.metrics.accuracy_score()
Precision Proportion of true positive over total number of samples. Higher precision leads to less false positives (model predicts 1 when it should've been 0). torchmetrics.Precision() or sklearn.metrics.precision_score()
Recall Proportion of true positives over total number of true positives and false negatives (model predicts 0 when it should've been 1). Higher recall leads to less false negatives. torchmetrics.Recall() or sklearn.metrics.recall_score()
F1-score Combines precision and recall into one metric, 1 is best, 0 is worst torchmetrics.F1Score() or sklearn.metrics.f1_score()
Confusion matrix Compares the predicted values with the true values in a tabular way, if 100% correct, all values in the matrix will be top left to bottom right (diagnoal line). torchmetrics.ConfusionMatrix or sklearn.metrics.plot_confusion_matrix()
Classification report Collection of some of the main classification metrics such as precision, recall and f1-score. sklearn.metrics.classification_report()

点个赞呗~

相关推荐
汉克老师13 分钟前
GESP2025年9月认证C++五级真题与解析(单选题9-15)
c++·算法·贪心算法·排序算法·归并排序·gesp5级·gesp五级
cjqbg19 分钟前
灵芽API:企业级大模型API聚合网关架构解析与成本效益对比
人工智能·架构·aigc·ai编程
人工智能培训23 分钟前
数字孪生应用于特种设备领域的技术难点
人工智能·机器学习·语言模型·数字孪生·大模型幻觉·数字孪生应用
慧一居士26 分钟前
OpenAI 和OpenApi 区别对比和关系
人工智能
资讯雷达31 分钟前
2026 年,GEO 优化如何选?风信子传媒:以“内容生态+智能分发”重塑品牌 AI 认知
大数据·人工智能·传媒
张祥64228890436 分钟前
误差理论与测量平差基础笔记七
线性代数·机器学习·numpy
lihao lihao36 分钟前
c++红黑树
算法
Sarvartha37 分钟前
递推与递归笔记
算法
中科天工1 小时前
当智能包装行业迎来新机遇,如何驾驭发展趋势?
大数据·人工智能·智能
BBTSOH159015160441 小时前
VR每日热点简报2026.1.23
人工智能·vr·人形机器人·动作捕捉·机械手·遥操作·数据手套