
Last chance! 50% off unlimited learning
Sale ends in
Randomly replaces a user-specified fraction of entries in an H2O dataset with missing values.
h2o.insertMissingValues(data, fraction = 0.1, seed = -1)
An H2OFrame object representing the dataset.
A number between 0 and 1 indicating the fraction of entries to replace with missing.
A random number used to select which entries to replace with
missing values. Default of seed = -1
will automatically
generate a seed in H2O.
Returns an H2OFrame object.
This will modify the original dataset. Unless this is intended, this function should only be called on a subset of the original.
# NOT RUN {
library(h2o)
h2o.init()
iris_hf <- as.h2o(iris)
summary(iris_hf)
irismiss <- h2o.insertMissingValues(iris_hf, fraction = 0.25)
head(irismiss)
summary(irismiss)
# }
Run the code above in your browser using DataLab