Simple data transformations
The German credit data available from the RSADBE 1.0 version has certain limitations. The data file in the package is named GC
. Many of the categorical variables are stored as integer classes, which affects the overall analysis. Also, some variables are not important here and after conversion from the integer class to the factor class, re-labeling is needed. For instance, detailed information about the variables can be obtained at https://archive.ics.uci.edu/ml/datasets/Statlog+(German+Credit+Data). In this section, we'll use the data set and carry out the necessary transformation.
Getting ready
The reader will need to install the RSADBE
package, which consists of the GC
dataset. As earlier, we first load all the pre-requisite libraries:
library (data.table) library (dplyr) library (RSADBE) library (rpart) library (randomForestSRC) library (ROCR) library (plyr)
How to do it...
The GC
dataset is available in the RSADBE
R package. As mentioned earlier, datasets consist...