The Algorithms logoThe Algorithms
About
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)

KNN

T
E