“scikit-learn Cookbook” by Trent Hauck is a recent cookbook with 50 recipes about the popular Python machine learning package scikit-learn. The book has 5 chapters and 195 pages:
- Premodel Workflow – data acquisition, preprocessing and data cleaning.
- Working with Linear Models – linear regression, ridge regression and logistic regression.
- Building Models with Distance Metrics – Kmeans clustering and Gaussian mixture models.
- Classifying Data with scikit-learn – decision trees, SVM and more.
- Postmodel Workflow – cross validation, grid search and model evaluation.
Although written in a cookbook format, the book is ordered by workflow steps for easier lookup. “scikit-learn Cookbook” does a good job of describing the most popular algorithms found in scikit-learn. With a few exceptions the cookbook uses mostly generated data and datasets from scikit-learn. On the one hand this makes it easy to reproduce results and we get to practice generating data with scikit-learn. On the other hand it might have been more fun to use real data that is not part of the scikit-learn distribution. The author often uses the Python shell for demonstrations. In the ebook I read, it was a bit hard to distinguish between the code in the shell and the related output (due to identical formatting).
Disclaimer: Fahad S. from Packt Publishing sent me a review copy.