【问题标题】:h2o model performance extractionh2o模型性能提取
【发布时间】:2023-03-16 20:48:01
【问题描述】:

在使用h2o H2ORandomForestEstimator 训练了一个随机森林分类器后,如何提取不同指标的模型性能报告?

ModelMetricsBinomial: drf
** Reported on train data. **

MSE: 0.3585693234630144
RMSE: 0.5988065826817658
LogLoss: 1.042047808195111
Mean Per-Class Error: 0.3219540722169749
AUC: 0.7464490458314232
AUCPR: 0.751360355831092
Gini: 0.4928980916628465

Confusion Matrix (Act/Pred) for max f1 @ threshold = 0.06774124943480285: 
False   True    Error   Rate

...

例如,我使用此过程训练了许多不同的模型,并希望比较最终结果,因此最好保存 model_performance 以供以后使用。 我希望保存为:

 {model1 : model_performance_1,
  model2 : model_performance_2, ........}

此外,我如何提取模型性能值?例如如何 提取混淆矩阵的值,就像提取混淆矩阵本身的值一样? perf.confusion_matrix()返回h2o对象,但是如何提取呢?

【问题讨论】:

    标签: python h2o


    【解决方案1】:

    您可以通过调用模型指标各自的方法来调用它们。例如。 model1.mse(), model1.auc(), model1.gini().

    对于您的第二个问题,尚不清楚您要提取什么。您可以将其加入列表perf.confusion_matrix().to_list()

    【讨论】:

      猜你喜欢
      • 2021-06-08
      • 2019-10-11
      • 2017-09-10
      • 2018-10-28
      • 2020-01-04
      • 1970-01-01
      • 2010-09-29
      • 2019-01-03
      • 2018-01-19
      相关资源
      最近更新 更多