Description Usage Arguments Value
We don't recommend to impute categorical variables with many levels.
1 2 | impute_model(data, column, NA_value = is.na, exclude_columns,
controls = NA, type = "xgboost")
|
data |
The dataset, as a data.frame. |
column |
The column to be imputed. Should be a string. |
NA_value |
A function to define what a NA is for this column which returns TRUE when a value is missing and FALSE otherwise. Will take one column vector as input. |
exclude_columns |
Columns that shouldn't be included in the imputation. |
controls |
Either:
|
type |
The type of algorithm to use for imputation. Options: mean, lm, and xgboost. Mean will calculate the mean for numeric sets and the mode for non-numerics. |
The model built based on type
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.