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

点个赞呗~

相关推荐
数说星榆181几秒前
脑启发计算与类神经形态芯片的协同
人工智能
m0_650108241 分钟前
AD-GS:面向自监督自动驾驶场景的目标感知 B 样条高斯 splatting 技术
论文阅读·人工智能·自动驾驶·基于高斯泼溅的自监督框架·高质量场景渲染
王锋(oxwangfeng)3 分钟前
自动驾驶领域OCC标注
人工智能·机器学习·自动驾驶
cxr8285 分钟前
从NP-hard到梯度下降:神经-符号架构如何破解因果发现的“计算魔咒”
人工智能·重构·认知框架
老陈聊架构10 分钟前
『AI辅助Skill』掌握三大AI设计Skill:前端独立完成产品设计全流程
前端·人工智能·claude·skill
小鸡吃米…28 分钟前
机器学习中的分类算法
人工智能·机器学习·分类
程序猿炎义30 分钟前
【Easy-VectorDB】Faiss数据结构与索引类型
数据结构·算法·faiss
weisian15142 分钟前
入门篇--知名企业-30-字节跳动-4--火山引擎:字节跳动的AI生产力引擎,如何悄悄赋能千万企业与开发者?
人工智能·科技·火山引擎
OpenCSG44 分钟前
新能源汽车行业经典案例 — 某新能源汽车 × OpenCSG
大数据·人工智能·汽车·客户案例·opencsg
绝不原创的飞龙1 小时前
K 最近邻回归器,解释:带代码示例的视觉指南
人工智能·数据挖掘·回归