h2o (version 3.22.1.1)

h2o.scale: Scaling and Centering of an H2OFrame

Description

Centers and/or scales the columns of an H2O dataset.

Usage

h2o.scale(x, center = TRUE, scale = TRUE)

# S3 method for H2OFrame scale(x, center = TRUE, scale = TRUE)

Arguments

x

An H2OFrame object.

center

either a logical value or numeric vector of length equal to the number of columns of x.

scale

either a logical value or numeric vector of length equal to the number of columns of x.

Examples

Run this code
# NOT RUN {
library(h2o)
h2o.init()
iris_hf <- as.h2o(iris)
summary(iris_hf)

# Scale and center all the numeric columns in iris data set
scale(iris_hf[, 1:4])
# }

Run the code above in your browser using DataLab