Good day
I'm getting and error trying to fit a KNN model. I created a test and train dataset as follows:
train <- bank_norm[1:32950, ]
test <- bank_norm[32951:41188, ]
train_labels <- bank[1:32950, 1]
bpredict <- knn(train, test, train_labels, 203)
To replicate, the two files are on this link: [Box Folder with two datasets to replicate][1]
bank <- read_csv("~/R/bank.csv")
bank_norm <- read_csv("~/R/bank_norm.csv")
then execute the code to create train and test and fit the model. Any idea what could be wrong? Thanks in advance.