May 2018
Beginner to intermediate
356 pages
9h 25m
English
KNN, like k-means, can work on high-dimensional data—but, like k-means, we can only graph example data in a two-dimensional plane so we'll keep our examples simple. The first question we'll tackle is: can we predict a person's biological sex given only their height and weight?
I've downloaded some data for this example from a national longitudinal survey on people's perception of their weight. Included in the data are the respondents' height, weight, and gender. This is what the data looks like, when graphed:

Just by looking at the preceding charted data, you can get a sense as to why KNN is so effective ...
Read now
Unlock full access