Using a random forest is it possible to determine which features were the driving features to classify a specific sample as class A?
I know I can ask which features are more important to perform classification of ANY sample, but can I ask this for a specific sample? E.g. Why was sample 1 classified as A? Which of its features were much more like class A than class B?
Does it even make sense to ask this question of a random forest?
Bonus points on how to do it with sklearn in python :)
Question has been answered in a crosspost here: https://stats.stackexchange.com/questions/174229/feature-importance-for-random-forest-classification-of-a-sample
Python implementation here: http://blog.datadive.net/random-forest-interpretation-with-scikit-learn/