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

点个赞呗~

相关推荐
5Gcamera2 分钟前
边缘计算视频分析智能AI盒子使用说明
人工智能·音视频·边缘计算
hg01185 分钟前
埃及:在变局中重塑发展韧性
大数据·人工智能·物联网
线束线缆组件品替网13 分钟前
IO Audio Technologies 音频线缆抗干扰与带宽设计要点
网络·人工智能·汽车·电脑·音视频·材料工程
Hcoco_me28 分钟前
大模型面试题63:介绍一下RLHF
人工智能·深度学习·机器学习·chatgpt·机器人
hkNaruto38 分钟前
【AI】AI学习笔记:LangGraph入门 三大典型应用场景与代码示例及MCP、A2A与LangGraph核心对比
人工智能·笔记·学习
向量引擎小橙38 分钟前
“2026数据枯竭”警报拉响:合成数据如何成为驱动AI进化的“新石油”?
大数据·人工智能·深度学习·集成学习
努力犯错1 小时前
Qwen Image Layered:革命性的AI图像生成与图层分解技术
人工智能·深度学习·计算机视觉
杜子不疼.1 小时前
【AI】基于GLM-4_7与数字人SDK的政务大厅智能指引系统实践
人工智能·microsoft·政务
core5121 小时前
SGD 算法详解:蒙眼下山的寻宝者
人工智能·算法·矩阵分解·sgd·目标函数
阿湯哥1 小时前
Spring AI Alibaba 实现 Workflow 全指南
java·人工智能·spring