View source: R/trans_imputation_predictive.R
| imputation_predictive | R Documentation |
Base class for supervised imputers that learn one target column from a set of source columns.
imputation_predictive(target, sources = NULL, method = c("median", "mean"))
target |
target column to impute |
sources |
optional vector of predictor column names |
method |
initial imputation method for numeric source columns: "median" or "mean" |
The target column is the attribute to be imputed. The source columns are the predictors used
to estimate missing target values. If sources = NULL, all supported columns except the target are used.
Missing values in source columns can be pre-imputed by a simpler method before fitting the predictive model.
returns an object of class imputation_predictive
Han, J., Kamber, M. and Pei, J. (2011). Data Mining: Concepts and Techniques (3rd ed.). Morgan Kaufmann. van Buuren, S. and Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software, 45(3):1-67.
data(iris)
imp <- imputation_predictive(
"Sepal.Length",
sources = c("Sepal.Width", "Petal.Length", "Petal.Width", "Species")
)
class(imp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.