Question: Hello, below is the assignment details. It is suppose to be written in Python. Any help is appreciated. Thank You. Directions: For this assignment, you

Hello, below is the assignment details. It is suppose to be written in Python. Any help is appreciated. Thank You.

Hello, below is the assignment details. It is suppose to be written

Directions: For this assignment, you need to build a KNN classifier from scratch. Below is a detailed instruction of what you may need to do. - Dataset Preparation You need to load the dataset using sklearn.datasets.load_digits. After loading the dataset, randomly shuffle the dataset to split the dataset to train/dev/test sets. - Use the 70% of data for the train set, 15% for the dev set, and 15% for the test set - You need to make sure that the labels and images are still matching after shuffling the data. - You may want to use the random shuffle function provided by Numpy. - KNN Development You need to write your own distance comparison function Use the train set as the training data, and use the dev set to determine the best K and best distance metric. - You may need to test multiple K values and distance metrics to select the optimal ones. - Test the Model After the optimal K value and distance metric are selected, test the model using the test set

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!