powered by
Instance-based learning algorithm.
KNN object
Provides functionality for KNN operations.
VectorForgeML-package
model <- KNN$new(k=3, mode="classification") X <- matrix(rnorm(20), nrow=10) y <- sample(0:1, 10, replace=TRUE) model$fit(X,y) model$predict(X)
Run the code above in your browser using DataLab