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

点个赞呗~

相关推荐
sali-tec5 小时前
C# 基于halcon的视觉工作流-章66 四目匹配
开发语言·人工智能·数码相机·算法·计算机视觉·c#
这张生成的图像能检测吗5 小时前
(论文速读)ParaDiffusion:基于信息扩散模型的段落到图像生成
人工智能·机器学习·计算机视觉·文生图·图像生成·视觉语言模型
新程记5 小时前
2025年,上海CAIE认证报考指南:把握AI机遇的实用起点
人工智能·百度
小明说Java6 小时前
常见排序算法的实现
数据结构·算法·排序算法
unicrom_深圳市由你创科技6 小时前
汽修AI智能体V1.0——从模型微调到应用部署
人工智能
路边草随风6 小时前
milvus向量数据库使用尝试
人工智能·python·milvus
irizhao6 小时前
基于深度学习的智能停车场系统设计与实现
人工智能·深度学习
行云流水20196 小时前
编程竞赛算法选择:理解时间复杂度提升解题效率
算法
九河云7 小时前
华为云 ECS 弹性伸缩技术:应对业务峰值的算力动态调度策略
大数据·服务器·人工智能·物联网·华为云
IT空门:门主8 小时前
Spring AI的教程,持续更新......
java·人工智能·spring·spring ai