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

点个赞呗~

相关推荐
秦先生在广东3 分钟前
构筑 AI Agent 的实时安全防线:Harness 与 AWS AgentCore Gateway 的深度集成解析
人工智能
秦先生在广东8 分钟前
可审计决策原语:重塑 Agent 循环中的治理与信任
人工智能
米小虾15 分钟前
一周 AI 观察(9.23–9.30):越狱的 Agent、腰斩的价格,与一场关于 GPU 的金融赌局
人工智能
秦先生在广东21 分钟前
AI 时代的交付新瓶颈:从代码生成速度到生产环境持续信任
人工智能
米小虾25 分钟前
把调度器扔了:微软 Agensh 让 1024 个编码 Agent 自组织,但收益正在变平
人工智能
米小虾30 分钟前
告别盲目重复采样:PTTS 用「规划-执行分离」把测试时算力省下一半
人工智能
有毒的教程1 小时前
AI文生视频转场提示词(直接复制,分类型|适配MiniMax H3 / 可灵 / Runway)
人工智能·音视频
泛联新安1 小时前
软件定义汽车时代,如何让AI研发“可信”?——泛联新安构建汽车企业级可信AI体系的落地路径
大数据·人工智能·安全·网络安全·汽车·漏洞挖掘·代码安全
禹凕1 小时前
机器学习之Selenium(Machina Learning about Selenium)
爬虫·python·selenium·测试工具·机器学习
不会就选b1 小时前
算法日常・每日刷题--<贪心>26
数据结构·算法