Impute missing values with a K-nearest neighbour

fdk_impute_knn(df, target, pred1, pred2 = NULL, pred3 = NULL, k)

Arguments

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

Value

a gap filled data frame