Last answered:

16 Jun 2020

Posted on:

08 Apr 2020

0

Credit Risk Modelling: Creating Scorecard from p-values (Formula Discrepancy)

While I was taking the credit risk modeling course and we calculated scorecard from p-values, I noticed one discrepancy in the
the given formula and the formula used in the tutorial notebook:

# Formula Used in the tutorial notebook coding

df_scorecard['Score - Calculation'][0] = ( 
( df_scorecard['Coefficients'][0]
- min_sum_coef
) 
/ 
(max_sum_coef - min_sum_coef)
) * (max_score - min_score) + min_score

 

# Formula image given in course

df_scorecard['Score - Calculation'][0] = ( 
( df_scorecard['Coefficients'][0]
- min_score
) 
/ 
(max_sum_coef - min_sum_coef)
) * (max_score - min_score) + min_score

# Scorecard intercept formula image imgur
https://imgur.com/a/UtRVzHc

 

 

# Great Problem: None of the formulae works for different features

I was trying different set of features to calculate the scorecard for the same problem using the exact notebook.

But I was greeted with wrong range of scorecard.

I was expecting range between 300 and 850, but the final output was different.

 

For the easiness of debugging the problem I have shared the notebook in Gcolab.

Notebook link:

https://colab.research.google.com/drive/1vB6rSviF6RX4p4O0YfH5RDoJJGKCg_yO

 

In this notebook I have different features and different p-values.

My aim is to get the scores from p-values.

When I followed the method provided in the course I got values out of range.

 

HOW TO GET THE VALUES WITHING THE RANGE?

 

Thanks a lot.

1 answers ( 0 marked as helpful)
Instructor
Posted on:

16 Jun 2020

0
Hi Bhishan, The formula in the lecture image is slightly incorrect, it should be min_sum_coef, and not min_score. You should not be obtaining scores from p-values but from the model coefficients.

Submit an answer