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

点个赞呗~

相关推荐
lljss20204 分钟前
5. 神经网络的学习
人工智能·神经网络·学习
jie*5 分钟前
小杰深度学习(fourteen)——视觉-经典神经网络——ResNet
人工智能·python·深度学习·神经网络·机器学习·tensorflow·lstm
闲看云起6 分钟前
论文阅读《LIMA:Less Is More for Alignment》
论文阅读·人工智能·语言模型·自然语言处理
jie*9 分钟前
小杰深度学习(sixteen)——视觉-经典神经网络——MobileNetV2
人工智能·python·深度学习·神经网络·tensorflow·numpy·matplotlib
TGITCIC9 分钟前
有趣的机器学习-利用神经网络来模拟“古龙”写作风格的输出器
人工智能·深度学习·神经网络·ai大模型·模型训练·训练模型·手搓模型
whltaoin22 分钟前
AI 超级智能体全栈项目阶段五:RAG 四大流程详解、最佳实践与调优(基于 Spring AI 实现)
java·人工智能·spring·rag·springai
colus_SEU35 分钟前
【编译原理笔记】2.1 Programming Language Basics
c++·算法·编译原理
Piink35 分钟前
网络模型训练完整代码
人工智能·深度学习·机器学习
luoganttcc38 分钟前
在 orin 上 安装了 miniconda 如何使用 orin 内置的 opencv
人工智能·opencv·计算机视觉
JinchuanMaster40 分钟前
cv_bridge和openCV不兼容问题
人工智能·opencv·计算机视觉