1
$\begingroup$

I have trained a xgboost model for a classification problem. I'm able to get the feature importance for the model as below.

http://machinelearningmastery.com/feature-importance-and-feature-selection-with-xgboost-in-python/

But I would like to get feature importance per input. Basically, one input may give me a output probability 0.9, another one input may give me a output probability 0.1. I want to know because which features (with values) give me a probability 0.9? which features (with values) give me a probability 0.1?

How can I approach that? Is there a package for this?

$\endgroup$
1
$\begingroup$

A partial dependence plot might be what you are after: these plots show the relationship between the probability and the input variable. The mlr package in R takes care of this.

Discussion of Partial Dependence on XGBoost Git: https://github.com/dmlc/xgboost/issues/486

General Tutorial using mlr: https://mlr-org.github.io/mlr-tutorial/devel/html/partial_dependence/index.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.