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

点个赞呗~

相关推荐
晚霞的不甘3 小时前
小智AI音箱:智能语音交互的未来之选
人工智能·交互·neo4j
飞Link3 小时前
【网络与 AI 工程的交叉】多模态模型的数据传输特点:视频、音频、文本混合通道
网络·人工智能·音视频
wearegogog1233 小时前
光谱分析波段选择的连续投影算法
算法
老蒋新思维3 小时前
创客匠人峰会实录:知识变现的场景化革命 —— 创始人 IP 如何在垂直领域建立变现壁垒
网络·人工智能·tcp/ip·重构·知识付费·创始人ip·创客匠人
执笔论英雄3 小时前
【RL】DAPO 数据处理
算法
老蒋新思维3 小时前
创客匠人峰会深度解析:智能体驱动知识变现的数字资产化路径 —— 创始人 IP 的长期增长密码
人工智能·网络协议·tcp/ip·重构·知识付费·创始人ip·创客匠人
为爱停留3 小时前
Spring AI实现RAG(检索增强生成)详解与实践
人工智能·深度学习·spring
像风没有归宿a4 小时前
2025年人工智能十大技术突破:从AGI到多模态大模型
人工智能
深鱼~4 小时前
十分钟在 openEuler 上搭建本地 AI 服务:LocalAI 快速部署教程
人工智能
why1514 小时前
面经整理——算法
java·数据结构·算法