impute_knn: Imputes all missing values with the KNN algorithm

View source: R/preprocessing_imputation.R

impute_knnR Documentation

Imputes all missing values with the KNN algorithm

Description

Imputes all missing values with the KNN algorithm

Usage

impute_knn(data, na_indicators = c(""), k = 10, verbose = FALSE)

Arguments

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.

k

An integer describing the number of nearest neighbours to use. By default set to 10.

verbose

A logical value, if set to TRUE, provides all information about preprocessing process, if FALSE gives none.

Value

Imputed dataset.


ModelOriented/forester documentation built on June 6, 2024, 7:29 a.m.