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

Groupwise permutation importance? #62

Open
bgreenwell opened this issue Dec 5, 2018 · 8 comments
Open

Groupwise permutation importance? #62

bgreenwell opened this issue Dec 5, 2018 · 8 comments
Labels

Comments

@bgreenwell
Copy link
Member

I've been asked several times about assigning importance to groups of features. Does it make sense to randomly permute all the features in a group to obtain such a metric?

@bradleyboehmke
Copy link
Member

Are they looking to pre-specify this group or have the algorithm auto identify groups?

@bgreenwell
Copy link
Member Author

Prespecified. As in all features fall into a particular group/bucket.

@bgreenwell
Copy link
Member Author

bgreenwell commented Jun 19, 2019

Example for a model with five features: x1, x2, x3, x4, and x5

feature_groups <- list(
  "group1" = c("x1", "x2", "x5"),  # psychological feature
  "group2" = c("x3", "x4")         # physiological features
)
vi_permute(model, feature_names = feature_groups, ...)

@bgreenwell
Copy link
Member Author

bgreenwell commented Jun 19, 2019

# This would work without having to change any other code
permute_columns <- function(x, columns = NULL) {
  x[, columns] <- x[sample(nrow(x)), columns]
  x
}

@bgreenwell
Copy link
Member Author

I want to implement this, but is there any literature on this?!?!

@ptaconet
Copy link

@bgreenwell
Copy link
Member Author

bgreenwell commented Jul 13, 2021

Yes @ptaconet, this is exactly what I’ve been looking for, thanks for posting it!! My only struggle was whether it makes more sense to permute features in a group independently or jointly, but it looks like this paper makes the case for the latter, at least upon skimming.

I’ve neglected some open source projects lately due to other obligations, but I’ll bump this to the top of the list when I revisits the package in the next month or two! PRs welcome as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants