Loan Data - Training and Test Data Sets

Premium

For building the model, we will divide our data into two different data sets, namely training and testing datasets. The model will be built using the training set and then we will test it on the testing set to evaluate how our model is performing.

There are many ways in which we can split the data. If we had multi-year data, we could have used data for some years as training data and other years as testing data. Our data is for the same period (2016 Q1). We will use a simple approach to randomly divide the dataset into training and test set.

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