Chapter 8. Machine Learning

In this chapter, we will cover the following topics:

  • Getting started with scikit-learn
  • Predicting who will survive on the Titanic with logistic regression
  • Learning to recognize handwritten digits with a K-nearest neighbors classifier
  • Learning from text – Naive Bayes for Natural Language Processing
  • Using support vector machines for classification tasks
  • Using a random forest to select important features for regression
  • Reducing the dimensionality of a dataset with a Principal Component Analysis
  • Detecting hidden structures in a dataset with clustering


In the previous chapter, we were interested in getting insight into data, understanding complex phenomena through partial observations, and making informed decisions in ...

Get IPython Interactive Computing and Visualization Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.