I have build a DNN in Python with input units like “age, income, time since last job switching, living situation: flat (y/n) house (y/n), …” and I try to predict if a person is satisfied with his life or not.
The model works quite well, but I would like to calculate the contribution of the different input units which led to the prediction “satisfied or not satisfied” of each person in the test data set. I would like to group these people in age clusters 18-20, 21-23,… and would like to assess if there are input units which are more important for one group than for another. Since I use a nonlinear activation function the contribution of the input units (for the predicted outcome) may change when predicting the outcome for different people, right?
I am wondering if it is mathematically possible to do such calculations and if so, if there is a “good way” do implement this in Python?
An alternative way I have thought about is to build DNNs with training data from the different age clusters and try to remove some of the input units of these models to assess the relevance for the different groups.
What do you guys think about this?
I pretty much appreciate your help/opinions.