Description Usage Arguments Details Value Author(s) See Also Examples
If you want to impute, build model and predict you should use
pre_impute_median
or pre_impute_knn
.
This function imputes using all observations
without caring about cross-validation folds.
1 2 3 | impute_knn(x, k = 0.05, distance_matrix = "auto")
impute_median(x)
|
x |
Dataset. |
k |
Number of nearest neighbors to use. |
distance_matrix |
Distance matrix. |
For additional information on the parameters see pre_impute_knn
and pre_impute
.
An imputed matrix.
Christofer Bäcklin
emil
, pre_process
,
pre_impute_knn
, pre_impute_median
1 2 3 4 | x <- matrix(rnorm(36), 6, 6)
x[sample(length(x), 5)] <- NA
impute_knn(x)
impute_median(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.