I have a data set something like this:
data = [['Alex',10,13,1,0],['Bob',11,14,12,0],['Clarke',13,15,13,1],['bob',12,15,1,1]] df = pd.DataFrame(data,columns = ["dealer","x","y","z","loss"])
I am trying to predict binary column loss, I have done this xgboost model. I got Overall feature importance. Now I need top 5 most important features dealer wise.
How to do that?
I have tried to use lime package but it is only working for Random forest.
If I get Feature importance for each observation(row) then also I can compute the feature importance dealer wise.