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

点个赞呗~

相关推荐
kingmax5421200813 小时前
工信部教育与考试中心AI证书归纳
人工智能·ai证书·以考促学
苦藤新鸡13 小时前
14.合并区间(1,3)(2,5)=(1,5)
c++·算法·leetcode·动态规划
2501_9415079413 小时前
【房屋建筑目标检测】基于Decoupled-Solo模型的建筑检测方法实现与优化_r50_fpn_1x_coco
人工智能·目标检测·计算机视觉
玩转数据库管理工具FOR DBLENS13 小时前
人工智能:演进脉络、核心原理与未来之路 审核中
数据库·人工智能·测试工具·数据库开发·数据库架构
程序员-King.13 小时前
day145—递归—二叉树的右视图(LeetCode-199)
算法·leetcode·二叉树·递归
海棠AI实验室13 小时前
第 3 篇:服务编排与自启动——把 Mac 变成“稳定可运维”的家庭 AI 机房
运维·人工智能·macos
Niuguangshuo13 小时前
Vision Transformer (ViT):当Transformer遇见图像,CV的范式革命
人工智能·深度学习·transformer
漫随流水13 小时前
leetcode算法(112.路径总和)
数据结构·算法·leetcode·二叉树
大模型任我行13 小时前
亚马逊:对话Agent轨迹学习框架WISE-Flow
人工智能·语言模型·自然语言处理·论文笔记
过期的秋刀鱼!13 小时前
机器学习-带正则化的成本函数-
人工智能·python·深度学习·算法·机器学习·逻辑回归