Logistic Regression in R
In this chapter, we will introduce logistic regression, covering its theoretical construct, connection with linear regression, and practical implementation. As it is an important classification model that is widely used in areas where interpretability matters, such as credit risk modeling, we will focus on its modeling process in different contexts, along with extensions such as adding regularization to the loss function and predicting more than two classes.
By the end of this chapter, you will understand the fundamentals of the logistic regression model and its comparison with linear regression, including extended concepts such as the sigmoid
function, odds ratio, and cross-entropy loss (CEL). You will also have grasped the commonly used evaluation metrics in the classification setting, as well as enhancements that deal with imbalanced datasets and multiple classes in the target variable.
In this chapter, we will cover the following:
- Introducing...