Question: Origin: this data is a modified version of the Optical Recognition of Handwritten Digits Dataset from the UCI repository. It contains pre - processed black
Origin: this data is a modified version of the Optical Recognition of Handwritten Digits Dataset from the
UCI repository. It contains preprocessed black and white images of the digits and Each feature
indicates how many pixels are black in a patch of x pixels.
Format: there is one row per image and one column per feature. The class labels are and The file
traintargets.csv includes the targets for the data in traininputs.csv
Implement knearest neighbours. You are required to personally implement the core functionality of
KNN which includes calculating distances between data points and determining predictions based on a
majority vote. Refrain from using external libraries for these specific tasks of the KNN algorithm.
However, you may utilize libraries for auxiliary tasks such as data loading, crossvalidation, and other
supportive functions.
Feel free to run the Jupyter notebook on any machine or Google Colab. Google Colab is a free cloud
environment provided by Google that allows you to run Jupyter notebooks very easily. Python and all
necessary libraries are already installed.
Once you are done, run the Jupyter notebook entirely and save the following results:
A graph that shows the average accuracy based on fold cross validation when varying the
number of neighbours from to
The best number of neighbours found by fold cross validation and its crossvalidation
accuracy.
The test accuracy based on the best number of neighbours
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
