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

点个赞呗~

相关推荐
wxl781227几秒前
开源AI记忆工具Cognee深度解析:技术优势、部署实践与实测验证
人工智能·congee 0.5版本·ai记忆·替代rag
不爱吃糖的程序媛1 分钟前
基于Ascend C开发的Vector算子模板库-ATVOSS 技术深度解读
人工智能·算法·机器学习
松涛和鸣2 分钟前
35、Linux IPC进阶:信号与System V共享内存
linux·运维·服务器·数据库·算法·list
wheeldown3 分钟前
在CodeRider-Kilo AI助手协助下实现的第一个小游戏——飞机大战
人工智能·产品运营
baby_hua3 分钟前
20251011_Pytorch深度学习(快速预览)
人工智能·pytorch·深度学习
natide4 分钟前
词汇/表达差异-1-编辑距离-莱文斯坦距离-Levenshtein
人工智能·深度学习·自然语言处理·知识图谱
会飞的小新4 分钟前
大语言模型训练全流程(技术深度拆解版)---以DeepSeek为例
人工智能·语言模型·自然语言处理
jrlong5 分钟前
三、Agent原理与最简实践学习笔记
人工智能·自然语言处理
工藤学编程5 分钟前
零基础学AI大模型之RunnableLambda
人工智能
serve the people5 分钟前
tensorflow 深度解析 Sequential 模型的输入形状指定
人工智能·python·tensorflow