Chapter 4. Classification (I) – Tree, Lazy, and Probabilistic

In this chapter, we will cover the following recipes:

  • Preparing the training and testing datasets
  • Building a classification model with recursive partitioning trees
  • Visualizing a recursive partitioning tree
  • Measuring the prediction performance of a recursive partitioning tree
  • Pruning a recursive partitioning tree
  • Building a classification model with a conditional inference tree
  • Visualizing a conditional inference tree
  • Measuring the prediction performance of a conditional inference tree
  • Classifying data with a k-nearest neighbor classifier
  • Classifying data with logistic regression
  • Classifying data with the Naïve Bayes classifier

Introduction

Classification is used to identify a category of new observations ...

Get R: Recipes for Analysis, Visualization and 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.