Answered step by step
Verified Expert Solution
Link Copied!

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

2 Coding
You can create a new classifier by implementing a sliding window kNN from
scratch, or you can create a copy ?2 and adapt one of the existing kNN 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 stand-alone classifier.
Standard kNN. A standard implementation of kNN for data streams main-
tains a single sliding window W with the latest N instances seen. The pre-
diction hat(y) for an unlabelled instance x is the most common label among the k
closest instances (nearest neighbors) to x in W, i.e. neighbour (x,k,W). This
process is shown in Figure 2, where all instances (red and blue circles) belong
to W.
2.1 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 kNN, 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 re-calculate 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 kNN classifier with sliding window W, where we use k=1. In
?2 You will need the original kNN implementation for the experiments, so do not overide it
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago