Learn R Programming

h2o (version 3.0.0.22)

h2o.anomaly: Anomaly Detection via H2O Deep Learning Model

Description

Detect anomalies in a H2O dataset using a H2O deep learning model with auto-encoding.

Usage

h2o.anomaly(object, data)

Arguments

object
An H2OAutoEncoderModel object that represents the model to be used for anomaly detection.
data
An H2OFrame object.

Value

  • Returns an H2OFrame object containing the reconstruction MSE.

See Also

h2o.deeplearning for making an H2OAutoEncoderModel.

Examples

Run this code
library(h2o)
localH2O = h2o.init()
prosPath = system.file("extdata", "prostate.csv", package = "h2o")
prostate.hex = h2o.importFile(localH2O, path = prosPath)
prostate.dl = h2o.deeplearning(x = 3:9, training_frame = prostate.hex, autoencoder = TRUE,
                               hidden = c(10, 10), epochs = 5)
prostate.anon = h2o.anomaly(prostate.dl, prostate.hex)
head(prostate.anon)

Run the code above in your browser using DataLab