Question: Write a program to perform supervised pattern classification using kNN classifiers as described in class. Your program should have two components: distance calculation and class
Write a program to perform supervised pattern classification using kNN classifiers as described in class. Your program should have two components: distance calculation and class assignment.
Discuss whether you need to normalize the dataset or not. Check the ranges of values and that will give you a hint. Then, normalize the dataset.
Separate the entire dataset samples into training and testing set such as training, testing.
For algorithm development, first implement a distance calculation module where a data set with labeled samples training data will be used to calculate distances to testing samples.
Second implement an assignment module where it will find kNearest Neighbors to classify samples with unknown class assignment. You must implement these two modules in one program.
Test your kNN for k and
Show your testing results for different k values using their accuracy and confusion matrix.
Write a code in python language
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
