TeamHG-Memex / eli5

A library for debugging/inspecting machine learning classifiers and explaining their predictions
http://eli5.readthedocs.io
MIT License
2.75k stars 332 forks source link

[idea] Feature importance grouping features together #309

Open BrunoGomesCoelho opened 5 years ago

BrunoGomesCoelho commented 5 years ago

I recently came across the idea of grouping features that are of particular interest during permutation importance, that is, shuffling more than one column at the same time.

From the link mentioned above:

You can pass in a list with a subset of features interesting to you. All unmentioned features will be grouped together into a single meta-feature on the graph. You can also pass in a list that has sublists like: [['latitude', 'longitude'], 'price', 'bedrooms']. Each string or sublist will be permuted together as a feature or meta-feature; the drop in overall accuracy of the model is the relative importance.

An example of the ideia and a python implementation can be seen in the rfpimp package.

I believe this would be a great addition to the eli5 package!

PS: For now I am mostly just suggesting the idea, but it might be something I would have interesting doing in the upcoming future.

lopuhin commented 5 years ago

@BrunoGomesCoelho I think this would be a useful feature 👍