Case Study
Explore Python concurrency concepts by implementing parallel hyperparameter tuning for a k-nearest neighbors classifier. Understand how to use ProcessPoolExecutor for efficient compute-intensive tasks, test multiple parameter sets concurrently, and interpret results to find optimal configurations.
One of the problems that often plagues data scientists working on machine learning applications is the amount of time it takes to train a model. In our specific example of the -nearest neighbors implementation, training means performing the hyperparameter tuning to find an optimal value of and the right distance algorithm. In the previous chapters of our case study, we’ve tacitly assumed there will be an optimal set of hyperparameters. We’ll look at one way to locate the optimal parameters.
In more complex and less well-defined problems, the time spent training the model can be quite long. If the volume of data is immense, then very expensive compute and storage ...