Credit Risk - Logistic Regression Model in R

Premium

To build our first model, we will tune Logistic Regression to our training dataset.

First we set the seed (to any number. we have chosen 100) so that we can reproduce our results.

Then we create a downsampled dataset called samp which contains an equal number of Default and Fully Paid loans. We can use the table() function to check that the downsampling is done correctly.

Unlock Premium Content

Upgrade your account to access the full article, downloads, and exercises.

You'll get access to:

  • Access complete tutorials and examples
  • Download source code and resources
  • Follow along with practical exercises
  • Get in-depth explanations