
Let's have a look at what the neural network produced: results <- ame(actual = testset$default10yr, prediction = creditnet.results$net.result) The set looks as follows: head(temp_test) The temp dataset contains only the columns LTI and age of the trainset. Temp_test <- subset(testset, select = c("LTI", "age"))Ĭreditnet.results <- compute(creditnet, temp_test)

The compute function is applied for computing the outputs based on the LTI and age inputs from the testset. Once we've trained the neural network we are ready to test it. The neuralnet package also has the possibility to visualize the generated model and show the found weights. # build the neural network (NN)Ĭreditnet <- neuralnet(default10yr ~ LTI + age, trainset, hidden = 4, lifesign = "minimal", The neuralnet package uses resilient backpropagation with weight backtracking as its standard algorithm. The ouput is not linear and we will use a threshold value of 10%. The lifesign option refers to the verbosity. The number of nodes is chosen here without a clear method, however there are some rules of thumb. Now we'll build a neural network with 4 hidden nodes (a neural network is comprised of a input, hidden and output nodes). As the ordering of the dataset is completely random, we do not have to extract random rows and can just take the first x rows. The dataset will be split up in a subset used for training the neural network and another set used for testing. Our goal is to devise a model which predicts, based on the input variables LTI and age, whether or not a default will occur within 10 years. The variables income (yearly), age, loan (size in euros) and LTI (the loan to yearly income ratio) are available. The dataset contains information on different clients who received a loan at least 10 years ago. # clientid income age loan LTI default10yr Fritsch.įirst let load the package and an example dataset. If you’re unsure on what a neural network exactly is, I find this a good place to start.įor this example the R package neuralnet is used, for a more in-depth view on the exact workings of the package see neuralnet: Training of Neural Networks by F. The actual procedure of building a credit scoring system is much more complex and the resulting model will most likely not consist of solely or even a neural network.

The following is an strongly simplified example. Neural networks are situated in the domain of machine learining. A creditscoring system can be represented by linear regression, logistic regression, machine learning or a combination of these. In other words: creditworthiness=f(income, age, gender, …). income, age, gender) that lead to a given level of creditworthiness. In the end it basically comes down to first selecting the correct independent variables (e.g. One can take numerous approaches on analysing this creditworthiness.

Credit scoring is the practice of analysing a persons background and credit application in order to assess the creditworthiness of the person.
