Reader small image

You're reading from  The Statistics and Machine Learning with R Workshop

Product typeBook
Published inOct 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781803240305
Edition1st Edition
Languages
Right arrow
Author (1)
Liu Peng
Liu Peng
author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng

Right arrow

Introducing logistic regression

Logistic regression is a binary classification model. It is still a linear model, but now the output is constrained to be a binary variable, taking the value of 0 or 1, instead of modeling a continuous outcome as in the case of linear regression. In other words, we will observe and model the outcome y = 1 or y = 0. For example, in the case of credit risk modeling, y = 0 refers to a non-default loan application, while y = 1 indicates a default loan.

However, instead of directly predicting the binary outcome, the logistic regression model predicts the probability of y taking a specific value, such as P(y = 1). The probability of assuming the other category is P(y = 0) = 1 P(y = 1), since the total probability should always sum to 1. The final prediction would be the winner of the two, taking the value of 1 if P(y = 1) > P(y = 0), and 0 otherwise. In the credit risk example, P(y = 1) would be interpreted as the probability of a loan defaulting...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
The Statistics and Machine Learning with R Workshop
Published in: Oct 2023Publisher: PacktISBN-13: 9781803240305

Author (1)

author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng