The Algorithms logo
The Algorithms
关于捐赠

Knn

I
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)