Prithvi
Prithvi

Reputation: 39

Determining the accuracy, precision, recall and F-Score of an H2O Random Forest Model

I'm using H2ORandomForestEstimator for multiclass classification.

After building and training as follows:

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)

I can see RMSE, MSE and Mean Error per class in the output

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

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

How do I obtain other metrics such as accuracy, precision, recall and F-Score?

Upvotes: 0

Views: 1033

Answers (1)

Erin LeDell
Erin LeDell

Reputation: 8819

Precision, Recall and F-Score are only available for binary classification. You have a multi-class case, which is why you don't see them. More information is available in the User Guide: http://docs.h2o.ai/h2o/latest-stable/h2o-docs/performance-and-prediction.html

Upvotes: 1

Related Questions