View source: R/helper_functions.R
fdk_impute_knn | R Documentation |
Impute missing values with a K-nearest neighbour
fdk_impute_knn(df, target, pred1, pred2 = NULL, pred3 = NULL, k)
df |
a data frame containing columns corresponding to the target and predictor variable names |
target |
a string specifying the target variable (column) name |
pred1 |
a string specifying the first predictor variable (column) name |
pred2 |
a string specifying the second predictor variable (column) name |
pred3 |
a string specifying the third predictor variable (column) name |
k |
an integer specifying the number of neighbours to consider |
a gap filled data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.