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

点个赞呗~

相关推荐
汤姆宝库5 小时前
蒸馏的三层实现:logits级、序列级与数据级
人工智能·深度学习·机器学习
云半S一5 小时前
Agent学习总结补充:2
人工智能·经验分享·笔记·agent·学习分享
wflynn6 小时前
Inkling 2 Mini:26B 参数循环 Transformer 的本地多模态模型
人工智能·ai
hryou09227 小时前
模型已经会欺骗评估员?24人爆料,OpenAI为何考虑停训
人工智能·ai编程
Csvn7 小时前
Agent 能调工具那天,权限就该已经修好了——最小权限 + 人工确认(S03)
人工智能·aigc·agent
Eyfcom7 小时前
〖物流低代码实战 06〗AI 生成 Schema 的工程边界:大模型能否直接接管快递软件的页面搭建?
人工智能·低代码·快递软件·物流低代码实战
甲维斯7 小时前
GLM5.4和GPT6.1赛马,搞定超级玛丽32关!
人工智能
qyr67898 小时前
全球汽车和航空航天用磁铁材料市场竞争格局变化趋势
大数据·人工智能·物联网·自动化·汽车和航空航天用磁铁材料
ZONGYUAN-ROOT8 小时前
【开源发布】约束运行时(Constraint Runtime)开源发布:给智能体规模化部署加四层护栏
人工智能·开源