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

点个赞呗~

相关推荐
Juchecar1 分钟前
假设人类能用光波沟通……
人工智能
K姐研究社2 分钟前
AipexBase怎么用?AI 原生BaaS平台一句话做后端开发
人工智能
IT_陈寒3 分钟前
SpringBoot 3.2新特性实战:这5个隐藏功能让开发效率翻倍🚀
前端·人工智能·后端
IT_陈寒10 分钟前
Vue3性能优化实战:这5个技巧让我的应用加载速度提升70% 🚀
前端·人工智能·后端
专注VB编程开发20年12 分钟前
.net c#音频放大,音量增益算法防止溢出
算法·c#·音频处理·录音·音量增益·增益控制
Mr.Winter`19 分钟前
自动驾驶运动规划 | 基于自行车模型的运动学模型和横向动力学模型详细推导图解
人工智能·机器人·自动驾驶·ros
唯道行24 分钟前
计算机图形学·6 OpenGL编程3 谢尔宾斯基垫与三维编程
人工智能·算法·计算机视觉·计算机图形学·三维·谢尔宾斯基垫
高山上有一只小老虎27 分钟前
求最大连续bit数
java·算法
落羽的落羽31 分钟前
【Linux系统】C/C++的调试器gdb/cgdb,从入门到精通
linux·服务器·c语言·c++·人工智能·学习·机器学习
磊磊落落33 分钟前
以自然语言的方式使用 Playwright MCP 进行浏览器自动化操作
人工智能·ai编程