Part 1: How to make kNN faster?
In the previous practical session (number 2), we implemented a basic k-Nearest Neighbors (kNN) algorithm. In today's session, we will focus on optimizing the performance of the kNN implementation—an essential step when dealing with large datasets.
We will look at one specific library called Numba, but other options are available FAISS, Cython or PyPy.
The objective for today is to implement a fast kNN and utilize a profiler to identify bottlenecks in the code that can be optimized further. By the end of the session, you will have a more efficient version of the kNN algorithm, suitable for handling large-scale data.