Learn R Programming

h2o (version 3.38.0.1)

h2o.aecu: Retrieve the default AECU (Average Excess Cumulative Uplift = area between AUUC and random AUUC)

Description

Retrieves the AECU value from an H2OBinomialUpliftMetrics. You need to specificy the type of AECU using metric parameter. Defaults "qini". Qini AECU equals the Qini value. If "train" and "valid" parameters are FALSE (default), then the training AECU value is returned. If more than one parameter is set to TRUE, then a named vector of AECUs are returned, where the names are "train", "valid".

Usage

h2o.aecu(object, train = FALSE, valid = FALSE, metric = "qini")

Arguments

object

An H2OBinomialUpliftMetrics

train

Retrieve the training AECU

valid

Retrieve the validation AECU

metric

Specify metric of AECU. Posibilities are "qini", "lift", "gain", defaults "qini".

Examples

Run this code
if (FALSE) {
library(h2o)
h2o.init()
f <- "https://s3.amazonaws.com/h2o-public-test-data/smalldata/uplift/criteo_uplift_13k.csv"
train <- h2o.importFile(f)
train$treatment <- as.factor(train$treatment)
train$conversion <- as.factor(train$conversion)

model <- h2o.upliftRandomForest(training_frame=train, x=sprintf("f%s",seq(0:10)), y="conversion",
                                ntrees=10, max_depth=5, treatment_column="treatment",
                                auuc_type="AUTO")
perf <- h2o.performance(model, train=TRUE) 
h2o.aecu(perf)
}

Run the code above in your browser using DataLab