Measuring Feature Importance in NNets for structured data

Hi everyone! I was wondering if there is anything like this: implemented anywhere.

I am trying to see if something like randomforestclassifier._feature_importances is available for pytorch. For structured datasets would be really neat to have that accesible!

Thanks in advance!

1 Like

Hi! I recently wrote a post about this! Neural Networks Feature Importance with fastai

The method I used is to shuffle each column, one at the time, and compute the decrease in the loss function. Probably there are more efficient or better ways to do it but I hope it can be helpful for a starting point!

1 Like