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

点个赞呗~

相关推荐
汪子熙23 分钟前
使用 Trae 开发一个演示勾股定理的动画演示
前端·人工智能·trae
Java致死32 分钟前
费马小定理
算法·费马小定理
不吃元西1 小时前
leetcode 74. 搜索二维矩阵
算法·leetcode·矩阵
小开不是小可爱1 小时前
leetcode_454. 四数相加 II_java
java·数据结构·算法·leetcode
小白学C++.1 小时前
大模型论文:CRAMMING TRAINING A LANGUAGE MODEL ON ASINGLE GPU IN ONE DAY(效率提升)-final
人工智能·语言模型·自然语言处理
Encarta19931 小时前
【语音识别】vLLM 部署 Whisper 语音识别模型指南
人工智能·whisper·语音识别
AWS官方合作商2 小时前
AWS Bedrock:开启企业级生成式AI的钥匙【深度解析】
大数据·人工智能·aws
神经星星2 小时前
【vLLM 学习】API 客户端
数据库·人工智能·机器学习
星江月2 小时前
EchoMimic 音频驱动照片生成视频部署测试
人工智能·echomimic·语音生成视频
剑盾云安全专家2 小时前
AI制作PPT,如何轻松打造高效演示文稿
人工智能·科技·aigc·powerpoint·软件