Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature importance method to Skorecard class #7

Open
orchardbirds opened this issue Jun 10, 2021 · 10 comments
Open

Add feature importance method to Skorecard class #7

orchardbirds opened this issue Jun 10, 2021 · 10 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@orchardbirds
Copy link
Collaborator

The feature importance in the context of the skorecard model is the feature IV*coef of the logistic regression.

Let's make this calculation within the skorercard class
In terms of code, it's similar to this

X_train_bins = scorecard.bucket_transform(X_train)
iv_dict = iv(X_train_bins, y_train)

iv_values = pd.Series(iv_dict).sort_values(ascending=False)
iv_values.name="IV"

feat_importance = model_stats[['Coef.']].join(iv_values)
feat_importance['importance'] = -1.*feat_importance['Coef.']*feat_importance['IV']
feat_importance.sort_values(by='importance', ascending=False)
@orchardbirds orchardbirds added the enhancement New feature or request label Jun 10, 2021
@timvink timvink added the good first issue Good for newcomers label Jun 15, 2021
@timvink
Copy link
Collaborator

timvink commented Aug 16, 2021

We also then need to update docs/tutorials/3_skorecard_models.ipynb, this section:

image

@satya-pattnaik
Copy link
Contributor

Also a suggestion, the coefficients have their own intervals(usually 5% and 95%), it would be great to have a weight plot. I would like to contribute in this issue.

@orchardbirds
Copy link
Collaborator Author

@satya-pattnaik This sounds like a really nice idea. If you like, I can open a separate issue for this and assign you to it?

@satya-pattnaik
Copy link
Contributor

Sounds good, you can assign it to me @orchardbirds .

@anilkumarpanda
Copy link
Contributor

Hey @orchardbirds @satya-pattnaik do you still plan to work on this issue ? Let me know how we can help you.

@rishabsinghh
Copy link

Hi is this issue still open, i would like to work on it

@ReinierKoops
Copy link

ReinierKoops commented Jun 13, 2023

@rishabsinghh awesome, I believe so. What do you think @anilkumarpanda ?

@rishabsinghh
Copy link

Whats the update? can i ?

@ReinierKoops
Copy link

Yes

@anilkumarpanda
Copy link
Contributor

Hi @rishabsinghh thanks for picking this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants