knn_impute {structToolbox}R Documentation

knn missing value imputation

Description

Applies a k-nearest neighbour approach to impute missing values.

Usage

knn_impute(
  neighbours = 5,
  sample_max = 50,
  feature_max = 50,
  by = "features",
  ...
)

Arguments

neighbours

The number of neighbours to use for imputation.

sample_max

Maximum percentage of missing values in any sample. Default = 50.

feature_max

Maximum percentage of missing values in any feature. Default = 50.

by

Impute by similar "samples" or "features". Default = "features".

...

additional slots and values passed to struct_class

Value

struct object

Examples

M = knn_impute()

[Package structToolbox version 1.0.1 Index]