parrt / dtreeviz

A python library for decision tree visualization and model interpretation.
MIT License
2.89k stars 332 forks source link

Any way to filter features before plotting with instance_feature_importance(x,figsize=(10,12))? #323

Open mojitopop opened 1 week ago

mojitopop commented 1 week ago

I want to test out the coefficient for a specific item in my df, however my df has over 600 columns and whenever i try to plot the features importance for that row i get something unreadable, is there a way to specify only plotting the features >0 or something?

I haven't seen anything helpful either by typing "help(viz_model.instance_feature_importance)"

tlapusan commented 1 week ago

Hi @mojitopop, I looked in the source code and there isn't yet such a logic, but a great suggestion. If you have time would be great to create a PR with this addition.

mojitopop commented 2 days ago

I would submit one but I honestly have no idea how to do pull requests and such