1 min read

Beware: a little knowledge is dangerous.

Beware: a little knowledge is dangerous.

I show the students how the k Nearest Neighbours (kNN) algorithm works even though I know nothing about data science. During the week, I read about the algorithm from some sites on the net and based on that I attempted to teach it. Beware: a little knowledge is dangerous. You know what they say about learning stuff from the internet, echo chambers and false news. Fingers crossed; I didn't read the false news variant of the kNN algorithm.

Some interesting things about F# show here are:

  • There is an Array2D module in F# that has syntax for slicing arrays.
  • The use of type providers to read the data from a CSV file and referral of the properties by their name. I'm not sure of any other language with this feature.

An interesting difficulty was the students seemed to struggle with the idea that distance can be used to measure something other than a physical property. I explain how this works in the last ten minutes