library(knn) x <- cbind(x_train,y_train) # Fitting model fit <-knn(y_train ~ ., data = x,k=5) summary(fit) # Predict Output predicted= predict(fit,x_test)
© The Algorithms 2023