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

点个赞呗~

相关推荐

  1. 机器学习 - metric评估方法

    2024-04-06 07:34:01       34 阅读
  2. 机器学习(2_1)经验误差,拟合度,评估方法

    2024-04-06 07:34:01       47 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-06 07:34:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-06 07:34:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-06 07:34:01       82 阅读
  4. Python语言-面向对象

    2024-04-06 07:34:01       91 阅读

热门阅读

  1. Flink应用

    2024-04-06 07:34:01       29 阅读
  2. Spring Boot 集成 RabbitMQ(二)

    2024-04-06 07:34:01       29 阅读
  3. PyTorch之Torch Script的简单使用

    2024-04-06 07:34:01       31 阅读
  4. PyTorch搭建Autoformer实现长序列时间序列预测

    2024-04-06 07:34:01       28 阅读
  5. 深拷贝与浅拷贝

    2024-04-06 07:34:01       34 阅读
  6. WebView 后退键处理技巧:如何处理网页历史记录

    2024-04-06 07:34:01       32 阅读