gbm-developers / gbm3

Gradient boosted models
134 stars 116 forks source link

Add the ability to calculate importance by class for multiclass classification #154

Open see24 opened 6 years ago

see24 commented 6 years ago

This is not possible in the old gbm but I recently wrote a function to calculate it. It can yield very different results for the most important variables for different classes. See this question and my answer for the code Hopefully you would just need to translate this from my dplyr/purrr version to base to implement it. If it doesn't make sense to do this this way please let me know!

ayushnoori commented 3 years ago

Has variable importance for multiclass classification officially been implemented yet? If not, @see24 did you find any issues with the code which you posted on SO?

see24 commented 3 years ago

I did continue using this code and I published an article that used the by class variable importance. In this article the importance of different variables for different classes mostly aligned with our ecological expectations so I felt pretty good about it. However, nobody with in depth knowledge of the gbm package or the statistics behind it has reviewed the code as far as I know.