Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this problem, you will perform Nearest Neighbour to perform data classification. The file test data.mat contains for entries matrices: 1 class eval a vector
In this problem, you will perform Nearest Neighbour to perform data
classification.
The file test data.mat contains for entries matrices:
class eval a vector identifying the class of the evaluation set
or
class train a vector identifying the class of the training set
or
data train a matrix containing the measurements for the training
set. Each row is a measurement.
data eval a matrix contain the measurements for the evaluation
set.
a Write some code to perform nearest neighbour for the evaluation
set based on the training set. You will need to write the Nearest Neighbour code yourself. You cannot use MATLABs nearest
neighbour functions. Report the Confusion matrix C where Cij
gives the count of samples from class i which are classified as
being in class j
b Extend your code to perform the kNearest Neighbour Algorithm
for k to Report the Confusion matrix for each value of k
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started