Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3 [ 30 marks] The basic k-nearest neighbor algorithm is given below. Algorithm Basic k-NN classification algorithm. 1. Let k be the number of

image text in transcribed
Question 3 [ 30 marks] The basic k-nearest neighbor algorithm is given below. Algorithm Basic k-NN classification algorithm. 1. Let k be the number of nearest neighbors and D be the set of training examples. 2. for each test example z=(x,y) do 3. Compute d(x,x), the distance between z and every example, (x,y)D. 4. Select DzD, the set of k closest training examples to z. 5. y=argmax(x1,yj)DtI(v=yi), where I(a=b)=1 if a=b and 0 otherwise. 6. end for You are given the one-dimensional data set D shown in the table below. The data set D has ten data points. The one-dimensional data set D a. [10 marks] Use the majority voting technique to classify the test example z=5.0 using 9-NN (i.e., k=9 ). b. [20 marks] Use the distance-weighted voting technique to classify the test example z=5.0 using 9- NN (i.e., k=9 )

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

Step: 3

blur-text-image

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

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

6. List and explain important trends in compensation management.

Answered: 1 week ago

Question

=+derived from the assignment will balance the costs?

Answered: 1 week ago

Question

=+6 Who is the peer of the IA ?

Answered: 1 week ago