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

点个赞呗~

相关推荐
小陈phd2 小时前
多模态大模型学习笔记(七)——多模态数据的表征与对齐
人工智能·算法·机器学习
雨泪丶2 小时前
代码随想录算法训练营-Day35
算法
摆烂小白敲代码2 小时前
腾讯云智能结构化OCR在物流行业的应用
大数据·人工智能·经验分享·ocr·腾讯云
CoderJia程序员甲2 小时前
GitHub 热榜项目 - 日榜(2026-02-24)
人工智能·ai·大模型·github·ai教程
pursuit_csdn2 小时前
LeetCode 1022. Sum of Root To Leaf Binary Numbers
算法·leetcode·深度优先
nimadan122 小时前
**AI漫剧软件2025推荐,解锁高性价比创意制作新体验**
人工智能·python
前网易架构师-高司机2 小时前
带标注的安全带和车牌识别数据集,识别率在88.8%,可识别挡风玻璃,是否系安全带,车牌区域,支持yolo,coco json,pascal voc xml格式
人工智能·数据集·交通违法·违法拍摄·安全带
Bal炎魔2 小时前
AI 学习专题一,AI 实现的原理
人工智能·学习
kjmkq3 小时前
办公智能体落地:九科信息让AI深度融入企业日常运营
人工智能
NAGNIP3 小时前
一文搞懂神经元模型是什么!
人工智能·算法