h2o.kolmogorov_smirnov: Kolmogorov-Smirnov metric for binomial models

h2o.kolmogorov_smirnovR Documentation

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 signature 'H2OModelMetrics'
h2o.kolmogorov_smirnov(object)

## S4 method for signature 'H2OModel'
h2o.kolmogorov_smirnov(object)

Arguments

object

Either an H2OModel object or an H2OModelMetrics object.

Details

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

Value

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

See Also

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

Examples

## Not run: 
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)

## End(Not run)

h2o documentation built on May 29, 2024, 4:26 a.m.