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

点个赞呗~

相关推荐
算家计算1 小时前
“28项评测23项SOTA——GLM-4.1V-9B-Thinking本地部署教程:10B级视觉语言模型的性能天花板!
人工智能·开源
Codebee1 小时前
OneCode注解驱动:智能送货单系统的AI原生实现
人工智能·低代码
2401_878624791 小时前
pytorch 自动微分
人工智能·pytorch·python·机器学习
胖达不服输1 小时前
「日拱一码」021 机器学习——特征工程
人工智能·python·机器学习·特征工程
Rvelamen1 小时前
大模型安全风险与防护产品综述 —— 以 Otter LLM Guard 为例
人工智能
MARS_AI_1 小时前
大语言模型驱动智能语音应答:技术演进与架构革新
人工智能·语言模型·自然语言处理·架构·信息与通信
程序员小灰1 小时前
AI独角兽团队Manus裁员80人,剩下40人迁至新加坡总部!
人工智能·aigc·agent
新智元1 小时前
OpenAI去年挖的坑填上了!奖励模型首现Scaling Law,1.8B给70B巨兽上了一课
人工智能·openai
简婷187019987752 小时前
源网荷储 + 零碳园区:一场关于能源与未来的双向奔赴
大数据·人工智能·能源