Learn R Programming

h2o (version 3.44.0.3)

h2o.kolmogorov_smirnov: Kolmogorov-Smirnov metric for binomial models

Description

Retrieves a Kolmogorov-Smirnov metric for given binomial model. The number returned is in range between 0 and 1. K-S metric represents the degree of separation between the positive (1) and negative (0) cumulative distribution functions. Detailed metrics per each group are to be found in the gains-lift table.

Usage

h2o.kolmogorov_smirnov(object)

# S4 method for H2OModelMetrics h2o.kolmogorov_smirnov(object)

# S4 method for H2OModel h2o.kolmogorov_smirnov(object)

Value

Kolmogorov-Smirnov metric, a number between 0 and 1.

Arguments

object

Either an H2OModel object or an H2OModelMetrics object.

Details

The H2OModelMetrics version of this function will only take H2OBinomialMetrics objects.

See Also

h2o.gainsLift to see detailed K-S metrics per group

Examples

Run this code
if (FALSE) {
library(h2o)
h2o.init()
data <- h2o.importFile(
path = "https://s3.amazonaws.com/h2o-public-test-data/smalldata/airlines/allyears2k_headers.zip")
model <- h2o.gbm(x = c("Origin", "Distance"), y = "IsDepDelayed", 
                       training_frame = data, ntrees = 1)
h2o.kolmogorov_smirnov(model)
}

Run the code above in your browser using DataLab