tune.knn.impute: tune the parameter k of the knn algorithm used in imputation.

Description Usage Arguments Value

View source: R/imputation.R

Description

tune the parameter k of the knn algorithm used in imputation.

Usage

1
2
3
4
5
6
7
8
9
tune.knn.impute(
  data,
  cat.var = 1:ncol(data),
  k.min = 1,
  k.max = 20,
  frac.miss = 0.1,
  n.iter = 20,
  seed = 0
)

Arguments

data

a numerical matrix.

cat.var

vector containing the categorical variables

k.min

minimum value for k

k.max

maximum value for k

frac.miss

fraction of missing values to add

n.iter

number of iterations for each k

seed

random seed

Value

matrix of error distributions


tavazzie/bnstructScore documentation built on Dec. 23, 2021, 7:47 a.m.