In this week, we were taught about kd trees and similarity and distance metrics like euclidean distance and Pearson’s correlation. Let’s firstly start with kd trees KD Tree Algorithm The KD Tree Algorithm is one of the most commonly used Nearest Neighbor Algorithms. The data points are split at each node into two sets. Like the previous algorithm, the KD Tree is also a binary tree algorithm always ending in a maximum of two nodes. The split criteria chosen are often the median. On the right side of the image below, you can see the exact position of the data points, on the left side the spatial position of them. Data points and their position in a coordinate system. The KD-Tree Algorithm uses first the median of the first axis and then, in the second layer, the median of the second axis. We’ll start with axis X. The in ascending order sorted x-values are: 1,2,3,4,4,6,7,8,9,9. Followingly, the median is 6. The data points are then divided into smaller and bigger equal to 6. T...