Question: For the dataset on the link: https://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones Build a K-Nearest Neighbor classifier for this data. Let K take values from 1 to 50. For choosing
For the dataset on the link: https://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones
Build a K-Nearest Neighbor classifier for this data.
Let K take values from 1 to 50. For choosing the best K, use 10-fold cross-validation. Choose the best
value of K based on model F1-score.
You can use python libraries for the implementation but please comment on how the code works. Please help me, i am a beginner in Data Sciences
I also have a follow up question which i am willing to ask as a seperate question for more credits for the tutor. The questions that i will post as seperate question are :
Draw a surface plot of F1-score with respect to alpha and l1-ratio values.
Use the best value of alpha and l1-ratio to re-train the model on the training set and use it to predict
the labels of the test set. Report the confusion matrix, multi-class averaged F1-score and accuracy.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
