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

点个赞呗~

相关推荐
Sammyyyyy4 小时前
AI Gateway 与直连 LLM API 的应该怎么选,一篇文章说明白
人工智能·ai·gateway·ai编程·ai-native·servbay
小小龙学IT4 小时前
RTF提示词框架详解:3步写出让AI精准执行的高质量指令
人工智能
武子康4 小时前
Project Trust 不是 Sandbox:Pi Agent 的安全边界怎样补齐
人工智能·llm·agent
Zaimmm4 小时前
临床文献智能检索哪家强?2026年主流AI循证平台深度测评与推荐
大数据·人工智能·microsoft
fthux4 小时前
边缘计算:从概念到实践的全景解读
人工智能·边缘计算
QYR_Jodie4 小时前
2026-2032全球玻璃纤维网市场分析:2032年将达到5.55亿美元
大数据·人工智能
Ai_easygo4 小时前
AI下半场_04_CSDN版_开源逆袭
人工智能·开源
程序员cxuan4 小时前
一招教你在 Codex 中开启 1M 上下文
人工智能·后端·程序员
八角Z4 小时前
AI Agent作为经济参与者的兴起:机器经济与传统金融体系的并存与交织
大数据·人工智能·服务发现
碧海银沙音频科技研究院4 小时前
GX8002语音识别SDK
人工智能·语音识别