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

点个赞呗~

相关推荐
记忆张量MemTensor3 分钟前
MemOS Skill 上线|一句话即可接入 MemOS Cloud
大数据·数据库·人工智能·typescript·开源
H0311169853 分钟前
关于AI会议音视频转写与智能生成纪要工具的对比分析
人工智能·音视频
视跃科技7 分钟前
多路视频实时解码推理,是怎么做到“逐帧解码 + AI检测 + 目标框叠加上墙“的?
人工智能·目标跟踪·音视频
一木 之林10 分钟前
五、C++新特性、关键字与编译原理
java·jvm·算法
嘻嘻的AI日记15 分钟前
多库设置+自主选库检索,重塑智能知识管理体系
人工智能
华万通信king17 分钟前
GEO实战:用 llms.txt 给官网打“AI友好“地基(附配置示例)
人工智能·geo
AI云海21 分钟前
深度学习_全连接网络实现回归任务
人工智能·深度学习·回归
wangchen_023 分钟前
PyTorch
人工智能·pytorch·python
code_pgf26 分钟前
SAMLabeler-MNN 项目使用与编译问题解决
人工智能·深度学习·mnn
LoveAmySun31 分钟前
AI智能体如何落地公交营运真实业务
大数据·人工智能