【问题标题】:Determining the accuracy, precision, recall and F-Score of an H2O Random Forest Model确定 H2O 随机森林模型的准确度、精确度、召回率和 F 分数
【发布时间】:2021-02-11 15:42:08
【问题描述】:

我正在使用 H2ORandomForestEstimator 进行多类分类。

构建和训练后如下:

train, valid = hdf.split_frame(ratios=[.8], seed=1234)
# Build and train the model:
drf = H2ORandomForestEstimator(model_id="drf", seed=1234)
drf.train(x=predictors,
               y=response,
               training_frame=train,
               validation_frame=valid)

drf.model_performance(valid)

我可以在输出中看到每个类的 RMSE、MSE 和平均误差

ModelMetricsMultinomial: drf
** Reported on test data. **

MSE: 0.12204577776460168
RMSE: 0.34935050846478194
LogLoss: 0.4781165975023516
Mean Per-Class Error: 0.23864386780117242

我如何获得其他指标,例如准确度、精确度、召回率和 F-Score?

【问题讨论】:

标签: python random-forest h2o


【解决方案1】:

Precision、Recall 和 F-Score 仅适用于二元分类。您有一个多类案例,这就是您看不到它们的原因。用户指南中提供了更多信息:http://docs.h2o.ai/h2o/latest-stable/h2o-docs/performance-and-prediction.html

【讨论】:

    猜你喜欢
    • 2022-01-06
    • 2016-01-09
    • 2016-06-19
    • 2020-08-03
    • 2020-11-17
    • 2019-08-21
    • 2011-11-01
    • 2020-09-02
    • 2015-12-05
    相关资源
    最近更新 更多