Connect your moderator Slack workspace to receive post notifications:
Sign in with Slack

Pb 18 exam 2018

Hello,

If it is possible, I would like to have more explanations on the problem 18 of 2018. Indeed, for the question 3, I'm not sure to understand why best choices of k are 5 or 7 (why not 3 for instance?). And for the question 4, I don't understand why the regions should be piece-wise linear. In the lesson, figure 2.3 and 2.2 do not show piece wise linear decision boundaries.

thank you!!

Top comment

5 and 7 missclassifies the same amount of points while picking 3 would missclassify 1 additional point(the possitive one in the middle).

I cant really answer exactly why that they all arent all piece wise linear in the lecture, possbily because of the high amount of points. Or possibly because the visualisation software does something.

Ah okay I see. But picking 3 would then missclassify 2 additional points (the positive and the negative one in the middle) not only 1 additional point right?
And for my second question, I don't understand why KNN decision boudaries MUST be piece-wise linear??
Thank you so much for your help!!

Yes exactly!

I scoured the web a bit and Im pretty sure KNNs in general are piece wise linear. The way I think about is that between any set of points you can draw equidistant lines between them and these lines create boundaries that decide how one should classify the point.

this is an example of exactly what areas matter in KNN that made it make sense for me, hope it doesnt confuse you, it focuses on how just a single point contributes to the KNN classification!

bild_2022-01-11_113854.jpeg

Here we have an simplified KNN scenario where the data points are put in pattern for visualisation, the lines drawn are equidistant from eihter the closest or the second closest point to the one in the center. The red area indicates the area where the central contributes to the KNN in case of k >= 1 and the yellow when k =>2 etc.

Of course you dont get this nice pattern when the data points are more randomized but you will still get piece-wise linear functions!

Page 1 of 1

Add comment

Post as Anonymous Dont send out notification