custom_h2o_confusion_metrics: Custom classification metrics for h2o automl models

Description Usage Arguments Value Examples

View source: R/custom_h2o_confusion_metrics.R

Description

model: The model name threshold: Threshold value logloss: The logloss of the model (see https://www.kaggle.com/dansbecker/what-is-log-loss for more information) precision: True Positives / Predicted Positives recall: True Positives / All Positives neg_precision: Negative Prevision, True Negatives / Predicted Negatives specificity: True Negatives / All Negatives fall_out: 1 - specificity, used to plot ROC curves f1_score: F1 Score or Balanced Accuracy, the harmonic mean of precision and recall true_positives: Number of True Positives false_negatives: Number of False Negatives false_positives: Number of False Positives true_negatives: Number of True Negatives

Usage

1
2
3
4
5
custom_h2o_confusion_metrics(
  model = NULL,
  newdata = NULL,
  threshold = c(0.4, 0.6)
)

Arguments

model

An existin h2o model object.

newdata

An h2o data object to apply the model object to. Typically a test set.

threshold

A range of threshold/cut-off values to evaluate.

Value

A data.frame containing metrics for each threshold value provided.

Examples

1
## Not run: custom_h2o_confusion_metrics(model = NA, newdata = NA, threshold = c(0,1)

BillPetti/h2oclasseval documentation built on Sept. 7, 2020, 12:13 p.m.