tune.knn.impute {bnstruct} | R Documentation |
tune the parameter k of the knn algorithm used in imputation.
Description
tune the parameter k of the knn algorithm used in imputation.
Usage
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
[Package bnstruct version 1.0.15 Index]