View source: R/preprocessing_imputation.R
impute_basic | R Documentation |
Fast and simple imputation method treating categorical and numerical features differently. Please, note that imputation is performed on all columns including the target 'y', as we assume that it has no missing values or these were handled by removal functions or the user.
impute_basic(
data,
na_indicators = c(""),
categorical_imputation = "other",
verbose = FALSE
)
data |
A data source, that is one of the major R formats: data.table, data.frame, matrix, and so on. |
na_indicators |
A list containing the values that will be treated as NA indicators. By default the list is c(”). WARNING Do not include NA or NaN, as these are already checked in other criterion. |
categorical_imputation |
A string value describing the imputation method for categorical features. The user can choose from setting missing values as 'other' or the most frequent value from feature. The respective options are: 'other' or 'frequency'. By default set to 'other'. |
verbose |
A logical value, if set to TRUE, provides all information about preprocessing process, if FALSE gives none. |
Imputed dataset.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.