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

点个赞呗~

相关推荐
冬奇Lab几秒前
RAG 系列(七):检索策略——如何找到最相关的内容
人工智能·llm·源码
薛定猫AI6 分钟前
【深度解析】DeepSeek V4 + Cloud Code:构建低成本、高吞吐的混合 AI 编码工作流
人工智能·log4j
数智工坊8 分钟前
【Transfer CLIP论文阅读】跨模态大模型赋能!CLIP迁移学习实现超强泛化图像去噪
论文阅读·人工智能·迁移学习
科研前沿10 分钟前
MatrixFusion™+ 云边端协同,百路视频全域融合实现零延时指令闭环
大数据·人工智能·音视频
AI周红伟12 分钟前
三年狂赚1.75亿!卖课,才是中国AI最容易赚钱的生意
人工智能·深度学习·学习·机器学习·copilot·openclaw
R御12 分钟前
Mem0g用图谱拿到 68.4%,TiMem5 层时间树为什么走另一条路
人工智能
月诸清酒16 分钟前
52-260504 AI 科技日报 (四月AI架构密集发布,模型更新潮来临)
人工智能
AI周红伟23 分钟前
一天赚5个亿的超级个体天花板李一舟:普通人可借鉴的6点
大数据·人工智能·搜索引擎·copilot·openclaw
MATLAB代码顾问25 分钟前
AI Agent智能体开发实战:LangChain自动化工作流
人工智能·langchain·自动化
永远不会的CC27 分钟前
Hello-Agents 初识智能体(实现一个简单旅游推荐智能体)
人工智能·学习·旅游