Chapter 2. Constructing a Classifier

In this chapter, we will cover the following recipes:

  • Building a simple classifier
  • Building a logistic regression classifier
  • Building a Naïve Bayes classifier
  • Splitting the dataset for training and testing
  • Evaluating the accuracy using cross-validation
  • Visualizing the confusion matrix
  • Extracting the performance report
  • Evaluating cars based on their characteristics
  • Extracting validation curves
  • Extracting learning curves
  • Estimating the income bracket

Introduction

In the field of machine learning, classification refers to the process of using the characteristics of data to separate it into a certain number of classes. This is different from regression that we discussed in the previous chapter where the output is a real number. ...

Get Python: Real World Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.