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

点个赞呗~

相关推荐
2501_941111526 小时前
C++中的适配器模式
开发语言·c++·算法
2501_941111946 小时前
C++中的适配器模式变体
开发语言·c++·算法
FL16238631296 小时前
智慧交通自动驾驶场景道路异常检测数据集VOC+YOLO格式8302张6类别
人工智能·yolo·自动驾驶
拓端研究室6 小时前
专题:2025年AI Agent智能体行业价值及应用分析报告:技术落地与风险治理|附140+ 份报告PDF、数据、可视化模板汇总下载
人工智能·pdf
数据与后端架构提升之路6 小时前
英伟达的 Alpamayo-R1:利用因果链推理赋能自动驾驶模型和数据工程剖析
人工智能·机器学习·自动驾驶
算家计算6 小时前
Grok 4.1深夜发布!算力需求跃升背后的技术演进与开发者机遇
人工智能·资讯
旋转的马铃薯干7 小时前
bulk RNA-Seq(7)差异表达分析可视化
算法
旋转的马铃薯干7 小时前
bulk RNA-Seq(8)富集分析
算法
2501_941111777 小时前
C++代码移植性设计
开发语言·c++·算法
deephub7 小时前
TOON:专为 LLM 设计的轻量级数据格式
人工智能·prompt·大语言模型