Impute numerical features by histogram.
During training, a histogram is fitted using R's
The fitted histogram is then sampled from for imputation. This is an approximation to
sampling from the empirical training data distribution (i.e. sampling from training data
with replacement), but is much more memory efficient for large datasets, since the
does not need to save the training data.
R6Class object inheriting from
PipeOpImputeHist$new(id = "imputehist", param_vals = list())
Identifier of resulting object, default
param_vals :: named
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default
Input and output channels are inherited from
The output is the input
Task with all affected numeric features missing values imputed by (column-wise) histogram.
$state is a named
list with the
$state elements inherited from
$state$model is a named
lists containing elements
The parameters are the parameters inherited from
graphics::hist() function. Features that are entirely
NA are imputed as
Only methods inherited from
Other Imputation PipeOps:
library("mlr3") task = tsk("pima") task$missings() po = po("imputehist") new_task = po$train(list(task = task))[] new_task$missings() po$state$model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.