Question: Create a model specification for K-nearest neighbours classification by using the nearest_neighbor() function. Specify that we want to set k = 7 and use the
Create a model specification for K-nearest neighbours classification by using the nearest_neighbor() function. Specify that we want to set k = 7 and use the straight-line distance. Furthermore, specify the computational engine to be "kknn" for training the model with the set_engine() function. Finally, identify that this is a classification problem with the set_mode() function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
