This chapter is devoted to an important class of machine learning algorithms, known as instance-based models. The name comes from the fact that they are built around the notion of similarity between instances (distance) and the geometrical intuition behind it. As a practical application of our newly learned skills, we will build an app that recognizes types of user movements based on the data from motion sensors and learns completely on device (no Python this time).
The algorithms that we are discussing and implementing in this chapter are k-nearest neighbors (KNN) and dynamic time warping (DTW).
In this chapter, we will cover the following topics:
- Choosing a distance metric—Euclidean, edit distance, taxicab, and DTW
- Building a KNN multiclass classifier
- Geometrical intuition behind machine learning models
- Reasoning in high-dimensional spaces...