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

点个赞呗~

相关推荐
TMT星球1 分钟前
荣耀将阿莱电影工作流融入机器人手机
人工智能·智能手机·机器人
沫儿笙2 分钟前
焊接机器人气保焊省气设备
人工智能·机器人
cxr8283 分钟前
物理信息约束生成式AI高分子逆向设计方法
人工智能·智能体·逆向设计合成·材料合成
Margrop4 分钟前
用了 40 年的 TCP,为什么被 HTTP/3“抛弃”了?
人工智能
稚南城才子,乌衣巷风流4 分钟前
树的重心:概念、性质与算法详解
算法·深度优先·图论
Ai_easygo5 分钟前
AI Agent可观测性_破解多步推理黑盒
人工智能
Sciencemio6 分钟前
五源紧耦合厘米级定位:无需外部标识的全域机器人部署技术方案
人工智能·计算机视觉·机器人
何时梦醒6 分钟前
🏯 从零搭建《天龙八部》RAG 智能问答系统 — 完整实战学习日志
数据库·人工智能
zoytown7 分钟前
Vibe Coding 从 Demo 到交付:12 个必须回答的工程问题
人工智能
石榴8 分钟前
SQL Workbench 0.3.0:给数据库插件加 AI,难的不是接上模型
人工智能