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'] = ( ( df_scorecard['Coefficients'] - min_sum_coef ) / (max_sum_coef - min_sum_coef) ) * (max_score - min_score) + min_score
# Formula image given in course
df_scorecard['Score - Calculation'] = ( ( df_scorecard['Coefficients'] - min_score ) / (max_sum_coef - min_sum_coef) ) * (max_score - min_score) + min_score
# Scorecard intercept formula image imgur
# 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.
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.
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.