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

点个赞呗~

相关推荐
ai产品老杨6 分钟前
H264 H265视频分析常见问题和排查清单
人工智能·算法·音视频
项目经理老王20 分钟前
OpenClaw无捆绑安装包,安全纯净版AI助手部署
人工智能·安全
Jerry32 分钟前
LeetCode 454. 四数相加 II
算法
梦帮科技1 小时前
GRAVIS v4.0:基于Web的极速套利架构设计与实时数据流实现
前端·人工智能·rust·自动化·区块链·智能合约·数字货币
“码”力全开1 小时前
AI视频分析API性能优化指南
人工智能·性能优化·音视频
liuyicenysabel1 小时前
大模型学习笔记 · 第八篇 · 进阶:偏好对齐与多卡训练
人工智能·笔记·学习
可编程芯片开发1 小时前
基于CPS-SPWM链式STATCOM系统在电压不平衡环境下控制策略的simulink建模与仿真
算法
CIO_Alliance1 小时前
iPaaS 生态与选型对比(1)| 开源vs商业 iPaaS:国内外iPaaS系统集成平台怎么选
人工智能·科普·ipaas·选型·系统集成
Jerry2 小时前
LeetCode 202. 快乐数
算法
米小虾2 小时前
为什么 AI 的下一个突破口,不是更大的模型,而是更好的"世界"?
人工智能·agent