h2o.insertMissingValues {h2o} | R Documentation |
Insert Missing Values into an H2OFrame
Description
Randomly replaces a user-specified fraction of entries in an H2O dataset with missing values.
Usage
h2o.insertMissingValues(data, fraction = 0.1, seed = -1)
Arguments
data |
An H2OFrame object representing the dataset. |
fraction |
A number between 0 and 1 indicating the fraction of entries to replace with missing. |
seed |
A random number used to select which entries to replace with
missing values. Default of |
Value
Returns an H2OFrame object.
WARNING
This will modify the original dataset. Unless this is intended, this function should only be called on a subset of the original.
Examples
## Not run:
library(h2o)
h2o.init()
iris_hf <- as.h2o(iris)
summary(iris_hf)
iris_miss <- h2o.insertMissingValues(iris_hf, fraction = 0.25)
head(iris_miss)
summary(iris_miss)
## End(Not run)
[Package h2o version 3.44.0.3 Index]