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

点个赞呗~

相关推荐
Landy_Jay1 分钟前
深度学习:基于Qwen复现DeepSeek R1的推理能力
人工智能·深度学习
EterNity_TiMe_6 分钟前
【人工智能】蓝耘智算平台盛大发布DeepSeek满血版:开创AI推理体验新纪元
人工智能·python·机器学习·deepseek
RFID舜识物联网15 分钟前
RFID测温技术:电力设备安全监测的新利器
网络·人工智能·嵌入式硬件·物联网·安全
豪越大豪16 分钟前
豪越消防一体化安全管控平台新亮点: AI功能、智能运维以及消防处置知识库
大数据·人工智能·运维开发
9命怪猫26 分钟前
AI大模型-提示工程学习笔记13—自动提示工程师 (Automatic Prompt Engineer)
人工智能·ai·大模型·prompt
SylviaW081 小时前
python-leetcode 37.翻转二叉树
算法·leetcode·职场和发展
h^hh1 小时前
洛谷 P3405 [USACO16DEC] Cities and States S(详解)c++
开发语言·数据结构·c++·算法·哈希算法
玦尘、1 小时前
位运算实用技巧与LeetCode实战
算法·leetcode·位操作
重生之我要成为代码大佬1 小时前
Python天梯赛10分题-念数字、求整数段和、比较大小、计算阶乘和
开发语言·数据结构·python·算法
Daitu_Adam1 小时前
Windows11安装GPU版本Pytorch2.6教程
人工智能·pytorch·python·深度学习