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

点个赞呗~

相关推荐
zhumin726几秒前
一种基于人类行为—内分泌映射的大语言模型动态情绪系统:从生理数据标定到虚拟激素驱动决策的工程化框架
人工智能·语言模型·自然语言处理
想吃火锅10052 分钟前
【leetcode】1.两数之和js版
javascript·算法·leetcode
云烟成雨TD6 分钟前
Spring AI 1.x 系列【46】MCP Security 模块
java·人工智能·spring
CRMEB系统商城8 分钟前
CRMEB多商户系统(Java)v2.3公测版发布
java·开发语言·人工智能·小程序·开源·php
Samooyou19 分钟前
RAG项目案例--02在线检索&过滤流水线
人工智能·python·ai·全文检索·检索
动能小子ohhh26 分钟前
DocForge平台的设计与开发--文件上传接口的实现
开发语言·人工智能·python·langchain·ocr·fastapi
朴马丁38 分钟前
预制菜的“数字厨房”:PLM如何支撑菜品标准化与供应链高效协同?
大数据·人工智能·食品行业·流程行业plm
小沈同学呀44 分钟前
SpringAI+MCPServer实战-StreamableHTTP协议打造企业级AI工具服务
人工智能·微服务架构·springai·mcpserver·javaai·streamablehttp
net3m331 小时前
一阶软件低通滤波器算法
人工智能·算法
武汉唯众智创1 小时前
边缘端部署 AI 心理分析:自研边缘主机跑通人脸 + 语音双模态推理,不用云端算力详解
人工智能·ai心理健康·校园心理健康·多模态推理·人脸情绪识别·语音情感分析·心理健康信息化平台