Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 Coding You can create a new classifier by implementing a sliding window kNN from scratch, or you can create a copy ? 2 and
Coding
You can create a new classifier by implementing a sliding window kNN from
scratch, or you can create a copy and adapt one of the existing im
plementations. However, we strongly recommend that you use the existing
implementations. Notice that your kNN adaptation must be implemented in a
way that it can be executed as a standalone classifier.
Standard kNN A standard implementation of for data streams main
tains a single sliding window with the latest instances seen. The pre
diction hat for an unlabelled instance is the most common label among the
closest instances nearest neighbors to in ie neighbour This
process is shown in Figure where all instances red and blue circles belong
to
Rocchio Classifier with sliding window
Rocchio classifier aka Nearest Centroid Classifier is a classification model
based on the centroids mean of the training samples. In contrast to stan
dard you are asked to use centroids instead of individual instances to
calculate the distance and find the nearest neighbors. Each class label will be
represented by a centroid. Notice that there is no need to recalculate the cen
troids from the scratch for each arriving instance, as you can use the techniques
from the second week's class to incrementally update centroids instance by in
stance.
Predictions. A prediction will be the label of the closest centroid. Consider
a standard classifier with sliding window where we use In
You will need the original implementation for the experiments, so do not overide it
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