Question: > knn_model summary(knn_model) Length Class Mode learn 2 -none- list k 1 -none- numeric theDots 0 -none- list xNames 16 -none- character problemType 1 -none-
> knn_model <- train(class ~ ., data = train_data, method = "knn", + trControl = control, tuneLength = 10,allowParallel = TRUE) Something is wrong; all the Accuracy metric values are missing: Accuracy Kappa Min. : NA Min. : NA 1st Qu.: NA 1st Qu.: NA Median : NA Median : NA Mean :NaN Mean :NaN 3rd Qu.: NA 3rd Qu.: NA Max. : NA Max. : NA NA's :10 NA's :10 Error: Stopping In addition: There were 50 or more warnings (use warnings() to see the first 50) > summary(knn_model) Length Class Mode learn 2 -none- list k 1 -none- numeric theDots 0 -none- list xNames 16 -none- character problemType 1 -none- character tuneValue 1 data.frame list obsLevels 1 -none- character param 0 -none- list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
