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

点个赞呗~

相关推荐
♡すぎ♡4 分钟前
镜面 IBL 预过滤贴图的计算
算法·计算机图形学·贴图·pbr
黑暗森林观察者4 分钟前
AI Agent 的"记忆进化":Skills 自进化框架如何让 Agent 越用越聪明?
人工智能
兆。9 分钟前
LangChain大模型服务集成指南:面向AI应用开发者
人工智能·langchain
刘一说20 分钟前
AI科技热点日报 | 2026年5月29日
人工智能·科技
Lsk_Smion23 分钟前
力扣实训 _ [200].岛屿数量
算法·leetcode·深度优先
jkyy201426 分钟前
AI健康管家:大模型赋能私域健康服务,重塑新零售智慧运营体系
人工智能·零售
Boom_Shu30 分钟前
长方形的关系
数据结构·c++·算法
薛定猫AI30 分钟前
Codex 与 Claude Code 安装配置完全指南
大数据·人工智能·架构
前沿AI34 分钟前
AI营销服一体化方案亮相2026中国汽车经销商大会,助力汽车销售全链路提效
大数据·人工智能·汽车
头盔小妹41 分钟前
在本地调用大语言模型
人工智能·语言模型·自然语言处理