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

点个赞呗~

相关推荐
小白说大模型11 分钟前
AI Agent 调试实战:从 Prompt 追踪到执行回放的系统化排障方法
人工智能·prompt
科研小刘带你玩学术18 分钟前
【学术干货】CVPR论文解析:扩散模型如何推动生成式人工智能进入新时代?
人工智能·深度学习·计算机视觉·生成式ai·扩散模型
大模型服务器厂商19 分钟前
AI行业调价潮与产业逻辑解析:算力基建与科研服务器的核心价值
人工智能
Wang's Blog20 分钟前
AI Agent白手起家28: LangChain 五种提示词模板实战解析
大数据·人工智能·langchain
又折桃枝换酒钱21 分钟前
CrossLMM:通过双交叉注意力机制从大型多模态模型中解耦长视频序列
人工智能·深度学习·机器学习
码云之上24 分钟前
Prompt Engineering:从提示词文案到 Agent 行为契约
人工智能·架构·前端工程化
小码哥06828 分钟前
2026陪诊小程序与APP开发技术分析
大数据·人工智能·小程序
观远数据37 分钟前
决策闭环的第三公里:从洞察到行动之间,AI能补上什么
大数据·数据库·人工智能
一次旅行41 分钟前
RLHF全链路深度解析:Reward Model数学推导+PPO完整实战,对比GRPO轻量化方案
人工智能·算法·机器学习
HIT_Weston43 分钟前
164、【Agent】【OpenCode】TuiThreadCmd(工厂设计对比)
人工智能·agent·opencode