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

点个赞呗~

相关推荐
2601_967659917 分钟前
2026选购科普:做静音床垫的品牌都有哪些
人工智能
飞Link9 分钟前
动作方法中的分割与过度分割方法全解析(含代码实战与踩坑案例)
人工智能·python·算法·计算机视觉
LlmCraft|大模型工程实践9 分钟前
01-NLP入门-什么是自然语言处理
人工智能·自然语言处理
小鹿的周先生19 分钟前
第四章-SpringAI-函数调用&ToolCalling
开发语言·人工智能·python
minhuan20 分钟前
AI Infra全栈拆解:大模型应用背后的基础设施,算力集群、网络、存储与服务治理体系26.0
人工智能·架构·ai infra·ai基础设施·ai任务调度
江畔柳前堤21 分钟前
具身智能全景深度指南(2026年9月版):从“会聊天的AI“到“能干活的机器“
大数据·javascript·图像处理·人工智能·分布式·智慧城市·原型模式
麻花地30 分钟前
RealTalk_AI:基于 Qwen3.5 LiveTranslate 的实时双向语音翻译工具
人工智能
张继雁32 分钟前
不同类型磨削液使用安全注意事项
人工智能·深度学习·安全·业界资讯·远程工作·空间计算
Mr数据杨33 分钟前
用会计信息做GDP增速预测的时序回归实战解析
人工智能·数据分析·kaggle竞赛
ClouGence34 分钟前
一句话直出可运行程序!GLM‑5.3 系列多任务实测
人工智能·agent·ai编程