机器学习 - 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 小时前
Python入门指南(七) - YOLO检测API进阶实战
人工智能·后端·python
wadesir5 小时前
Rust中的条件变量详解(使用Condvar的wait方法实现线程同步)
开发语言·算法·rust
tap.AI5 小时前
RAG系列(二)数据准备与向量索引
开发语言·人工智能
yugi9878386 小时前
基于MATLAB实现协同过滤电影推荐系统
算法·matlab
TimberWill6 小时前
哈希-02-最长连续序列
算法·leetcode·排序算法
Morwit6 小时前
【力扣hot100】64. 最小路径和
c++·算法·leetcode
leoufung6 小时前
LeetCode 373. Find K Pairs with Smallest Sums:从暴力到堆优化的完整思路与踩坑
java·算法·leetcode
老蒋新思维6 小时前
知识IP的长期主义:当AI成为跨越增长曲线的“第二曲线引擎”|创客匠人
大数据·人工智能·tcp/ip·机器学习·创始人ip·创客匠人·知识变现
货拉拉技术6 小时前
出海技术挑战——Lalamove智能告警降噪
人工智能·后端·监控
wei20236 小时前
汽车智能体Agent:国务院“人工智能+”行动意见 对汽车智能体领域 革命性重塑
人工智能·汽车·agent·智能体