h2o.deepfeatures: Feature Generation via H2O Deep Learning

View source: R/models.R

h2o.deepfeaturesR Documentation

Feature Generation via H2O Deep Learning

Description

Extract the non-linear feature from an H2O data set using an H2O deep learning model.

Usage

h2o.deepfeatures(object, data, layer)

Arguments

object

An H2OModel object that represents the deep learning model to be used for feature extraction.

data

An H2OFrame object.

layer

Index (integer) of the hidden layer to extract

Value

Returns an H2OFrame object with as many features as the number of units in the hidden layer of the specified index.

See Also

h2o.deeplearning for making H2O Deep Learning models.

Examples

## Not run: 
library(h2o)
h2o.init()
prostate_path = system.file("extdata", "prostate.csv", package = "h2o")
prostate = h2o.importFile(path = prostate_path)
prostate_dl = h2o.deeplearning(x = 3:9, y = 2, training_frame = prostate,
                               hidden = c(100, 200), epochs = 5)
prostate_deepfeatures_layer1 = h2o.deepfeatures(prostate_dl, prostate, layer = 1)
prostate_deepfeatures_layer2 = h2o.deepfeatures(prostate_dl, prostate, layer = 2)
head(prostate_deepfeatures_layer1)
head(prostate_deepfeatures_layer2)


## End(Not run)

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