rstudio / keras3

R Interface to Keras
https://keras3.posit.co/
Other
831 stars 282 forks source link

Extracting the variable importance in Keras #1013

Open brandythenarwhal93 opened 4 years ago

brandythenarwhal93 commented 4 years ago

Hello all,

I am quite new to programming so i am not too good with it. Currently I am working with a regression model use to find the relation between then variables and its output. i would like to apply some analysis to my model and find out the sensitivity of my output to changes to my input variable. I was looking at something called garson's algorithm and Lek's profile however i was not able to get it to work with keras. (I only know fhow to do it via the nnet package) Do let me know if you guys have suggestion on how to make it work or suggest any alternatives for such sensitivity analysis of my model. thanks

turgut090 commented 4 years ago

There is no such functionality in Keras. I would suggest applying FEATURE IMPORTANCE VISUALIZATION https://github.com/thomasp85/lime to see which variables contribute most to the output of each case.

One can find a post written by Matt Dancho for Customer Churn (tabular data) on RStudio AI blog: https://blogs.rstudio.com/tensorflow/posts/2018-01-11-keras-customer-churn/

And for image classification: https://blogs.rstudio.com/tensorflow/posts/2018-03-09-lime-v04-the-kitten-picture-edition/