Chapter 4. Classifying based on odds with logistic regression

This chapter covers

  • Working with the logistic regression algorithm
  • Understanding feature engineering
  • Understanding missing value imputation

In this chapter, I’m going to add a new classification algorithm to your toolbox: logistic regression. Just like the k-nearest neighbors algorithm you learned about in the previous chapter, logistic regression is a supervised learning method that predicts class membership. Logistic regression relies on the equation of a straight line and produces models that are very easy to interpret and communicate.

Logistic regression can handle continuous (without discrete categories) and categorical (with discrete categories) predictor variables. In its ...

Get Machine Learning with R, the tidyverse, and mlr 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.