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

Consider going back to Lasso for feature importance #98

Open
kwinkunks opened this issue Dec 17, 2023 · 0 comments
Open

Consider going back to Lasso for feature importance #98

kwinkunks opened this issue Dec 17, 2023 · 0 comments
Labels
enhancement New feature or request idea An idea to research and test

Comments

@kwinkunks
Copy link
Member

Lasso may be a better indicator of feature importance, as it tries to eliminate features. But the alpha parameter needs to be tuned, eg with https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LassoCV.html

@kwinkunks kwinkunks added enhancement New feature or request idea An idea to research and test labels Dec 17, 2023
kwinkunks added a commit that referenced this issue Dec 17, 2023
Part of #97. The goal is to make the function more explainable.
Moved the aggregation function to utils.py where it can be
inspected more easily. By default it's a simple sum, but
for the feature importance measure it normalizes before
summing over features, then normalizes the result so the
importances sum to 1. Borda counts are an option too but
I think scores are best for importance, to preserve the
magnitudes of the coefficients.

Also switched to LinearRegression instead of Lasso, which
should really be fitted for alpha, see #98.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idea An idea to research and test
Projects
None yet
Development

No branches or pull requests

1 participant