Function to carry out KNN imputation of missing values.
Usage
ec.knnimp(data, nomatr, k = 10)
Arguments
data
Original dataset with missing values
nomatr
Vector containing the indices of nominal attributes
k
Numeric value representing the number of neighbors to use for imputation
Value
data2contains values belonging to one class (of a larger matrix)
for which missing values in relevant variables have been imputed.
Details
This function is called by the function ce.knn.imp which is part of this library, to
impute values by class. If called alone the function will impute values based on information
in the entire matrix and not the classes. Needs also the function: nnmiss.
References
Acuna, E. and Rodriguez, C. (2004). The treatment of missing values and its effect in the classifier accuracy. In D. Banks, L. House, F.R. McMorris, P. Arabie, W. Gaul (Eds).
Classification, Clustering and Data Mining Applications. Springer-Verlag Berlin-Heidelberg, 639-648.