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

点个赞呗~

相关推荐
Geek-Chow1 小时前
MCP 模型上下文协议:十二、自测、练习与源码入口
人工智能
cubestudio1 小时前
海光 DCU 怎么接入 Kubernetes 和 AI 平台?CubeStudio 海光 DCU 适配实操(整卡 / 共享 / 两种 vDCU 虚拟化 + DeepSeek 部署)
人工智能·机器学习·gpu
火眼金睛炼单词1 小时前
单词发音学习深度解读:方法步骤与优化策略
人工智能·学习
dreamrise1 小时前
Windows AI 编程环境从零搭建指南[20260909]
人工智能
旺仔小馒头wang1 小时前
AI 与教育行业如何协同,助力孩子高效学习
人工智能·学习
空堂与归1 小时前
六步带你从零搭 Claude 电商 Agent(附源码解析)
人工智能
进击的横打1 小时前
【人工智能】AI时代公司组织架构的重构
大数据·人工智能·重构
枫彩1 小时前
WorkBuddy + 悟道 MCP:把盘后复盘保存成三个可对照的文件
人工智能·a股·股票数据·mcp·workbuddy
SimpleLearingAI1 小时前
DFL:分布焦点损失——让框回归“学分布“,而不只是“猜数字“
人工智能·数据挖掘·回归
唐兴通个人1 小时前
新华保险集团携手浙江大学,邀请唐兴通老师主讲AI时代b保险新媒体营销增长专项培训
人工智能