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

点个赞呗~

相关推荐
Java后端的Ai之路几秒前
【人工智能领域】-YOLO目标检测算法全解析(含大白话解释)
人工智能·yolo·目标检测·cnn
百家方案13 分钟前
“十五五”智慧城市解决方案:从技术赋能到场景智治,再造城市生命共同体
人工智能·智慧城市
_codemonster17 分钟前
深度学习实战(基于pytroch)系列完整目录
人工智能·深度学习
君义_noip20 分钟前
信息学奥赛一本通 2134:【25CSPS提高组】道路修复 | 洛谷 P14362 [CSP-S 2025] 道路修复
c++·算法·图论·信息学奥赛·csp-s
RichardLau_Cx25 分钟前
针对不同类别AI设计工具的核心使用方法
人工智能
程途拾光15832 分钟前
制造业中的预测性维护与异常检测
人工智能
kaikaile199532 分钟前
基于拥挤距离的多目标粒子群优化算法(MO-PSO-CD)详解
数据结构·算法
不忘不弃44 分钟前
求两组数的平均值
数据结构·算法
leaves falling1 小时前
迭代实现 斐波那契数列
数据结构·算法
薛晓刚1 小时前
AI编程:爽感背后的成本与隐忧
人工智能·ai编程