h2o.weights: Retrieve the respective weight matrix

Description Usage Arguments Examples

View source: R/models.R

Description

Retrieve the respective weight matrix

Usage

1
h2o.weights(object, matrix_id = 1)

Arguments

object

An H2OModel or H2OModelMetrics

matrix_id

An integer, ranging from 1 to number of layers + 1, that specifies the weight matrix to return.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
library(h2o)
h2o.init()

f <- "https://s3.amazonaws.com/h2o-public-test-data/smalldata/chicago/chicagoCensus.csv"
census <- h2o.importFile(f)
census[, 1] <- as.factor(census[, 1])
dl_model <- h2o.deeplearning(x = c(1:3), y = 4, training_frame = census,
                            hidden = c(17, 191), 
                            epochs = 1,
                            balance_classes = FALSE,
                            export_weights_and_biases = TRUE)
h2o.weights(dl_model, matrix_id = 1)

## End(Not run)

h2o documentation built on Oct. 10, 2021, 1:08 a.m.