机器学习 - 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()

点个赞呗~

相关推荐
沃达德软件1 小时前
视频增强技术解析
人工智能·目标检测·机器学习·计算机视觉·超分辨率重建
魔乐社区2 小时前
GLM-5上线魔乐社区,基于昇腾的模型推理+训练部署教程请查收!
人工智能·开源·大模型
geneculture2 小时前
化繁为简且以简驭繁:唯文论英汉对照哲学术语49个主义/论
人工智能·融智学的重要应用·哲学与科学统一性·信息融智学·融智时代(杂志)
睡醒了叭2 小时前
coze-工作流-http请求
人工智能·aigc
追随者永远是胜利者2 小时前
(LeetCode-Hot100)20. 有效的括号
java·算法·leetcode·职场和发展·go
twilight_4693 小时前
机器学习与模式识别——机器学习中的搜索算法
人工智能·python·机器学习
冰西瓜6003 小时前
深度学习的数学原理(十)—— 权重如何自发分工
人工智能·深度学习·计算机视觉
瓦特what?3 小时前
快 速 排 序
数据结构·算法·排序算法
niuniudengdeng3 小时前
基于时序上下文编码的端到端无文本依赖语音分词模型
人工智能·数学·算法·概率论
hetao17338373 小时前
2026-02-13~16 hetao1733837 的刷题记录
c++·算法