Skip to content

Commit

Permalink
Imputehist documentation
Browse files Browse the repository at this point in the history
closes #703
  • Loading branch information
mb706 committed Aug 16, 2024
1 parent 9624fb2 commit 6f6710a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions R/PipeOpImputeHist.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
#' @description
#' Impute numerical features by histogram.
#'
#' During training, a histogram is fitted using R's [`hist()`][graphics::hist] function.
#' 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 `$state`
#' During training, a histogram is fitted on each column using R's [`hist()`][graphics::hist] function.
#' The fitted histogram is then sampled from for imputation. Sampling happens in a two-step process:
#' First, a bin is sampled from the histogram, then a value is sampled uniformly from the bin.
#' 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 `$state`
#' does not need to save the training data.
#'
#' @section Construction:
Expand All @@ -26,7 +27,7 @@
#' @section Input and Output Channels:
#' Input and output channels are inherited from [`PipeOpImpute`].
#'
#' The output is the input [`Task`][mlr3::Task] with all affected numeric features missing values imputed by (column-wise) histogram.
#' The output is the input [`Task`][mlr3::Task] with all affected numeric features missing values imputed by (column-wise) histogram; see Description for details.
#'
#' @section State:
#' The `$state` is a named `list` with the `$state` elements inherited from [`PipeOpImpute`].
Expand Down
11 changes: 6 additions & 5 deletions man/mlr_pipeops_imputehist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f6710a

Please sign in to comment.