Measuring Feature Importance in NNets for structured data


(Ricardo Alanis) #1

Hi everyone! I was wondering if there is anything like this: https://www.sciencedirect.com/science/article/pii/S0304380004001565 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!


(Miguel) #2

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!