

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
gate - gate
Typology: Thesis
1 / 3
This page cannot be seen from the preview
Don't miss anything!


h(x) =
+1 (a ≤ x 1 ≤ a + s)AN D(b ≤ x 2 ≤ b + s) − 1 otherwise
Last 3 require our non-numeric data to be encoded either as sets or using 1-of-m encoding.
We can use L 0 distance because it counts number of disagreeing features in our sample.
3 Analysis of KNN
There are two cases to be considered here: (i) when the query point lies outside the circle, (ii) when the query point lies inside the circle. When the query point lies inside the circle, from the diagram it is easy to see that the closest point to x will be a point on the circumference of the circle, xa, while the farthest point xb will be the point on the circumference at 180o^ from xa. Therefore, lc = dist(x, xc) − r, and uc = dist(x, xc) + r For the second case: the closest point, xa, may be the same point as x, therefore, lc = 0. The upper bound uc will be the same. Taken the above cases together, we can write lower bound as:
lc = max(0, d(x, xc) − r) (2)
For this section we’ll work with tighter lower bound: la = d(x, xa) − r.
uc < lad(x, xc) + r < d(x, xa) − rd(x, xc) + 2r < d(x, xa)
The prediction algorithm is very simple. Given a total of M of balls (B)(xc, r); c = 1 : M with radius r and the count of training points covered by each ball Nc, we first compute the