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

点个赞呗~

相关推荐
做个文艺程序员5 分钟前
Spring Boot 项目集成 OpenClAW【OpenClAW + Spring Boot 系列 第1篇】
java·人工智能·spring boot·开源
天一生水water5 分钟前
CNN循环神经网络关键知识点
人工智能·rnn·cnn
一个喜欢分享的PHP技术6 分钟前
AI在龙虾中,配置标准版mcp的方法
人工智能
醇氧9 分钟前
Hermes Agent 学习(安装部署详细教程)
人工智能·python·学习·阿里云·ai·云计算
扬帆破浪22 分钟前
WPS 文字免费开源AI插件:察元 AI 文档助手如何把大模型接进日常写作
人工智能·开源·wps
麦哲思科技任甲林26 分钟前
AI编程的三大痛点及其工作模式
人工智能·ai编程·工作模式·自以为是·忘性大
Microsoft Word44 分钟前
零代码落地Rokid AI Glasses应用:个性化推荐旅游智能体搭建指南
人工智能·旅游
2603_954708311 小时前
交直流混合微电网架构:拓扑优化与功率交互设计
人工智能·分布式·物联网·架构·系统架构·能源
悬镜安全1 小时前
“Vibe Coding”时代的安全边界:悬镜问境AIST如何护航Agent开发全流程?
人工智能
故事和你911 小时前
洛谷-数据结构1-4-图的基本应用2
开发语言·数据结构·算法·深度优先·动态规划·图论