The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

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

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

0
Votes
1
Answer

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 Answer

365 Team
0
Votes

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.