h2o.scale: Scaling and Centering of an H2OFrame

View source: R/frame.R

h2o.scaleR Documentation

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, inplace = FALSE)

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.

inplace

a logical values indicating whether directly overwrite original data (disabled by default). Exposed for backwards compatibility (prior versions of this functions were always doing an inplace update).

Examples

## 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
iris_scaled <- h2o.scale(iris_hf[, 1:4])

## End(Not run)

h2o documentation built on Aug. 9, 2023, 9:06 a.m.