I have built a binary classification model using:

  • logit
  • decision trees
  • random forest
  • bagging classifier
  • gradientboost
  • xgboost
  • adaboost

I have evaluated the above models and chose xgboost based on training/test and validation metrics (accuracy, prediction, recall, f1 and AUC).

I want to now productionalize it and share the output with the business. The output would basically have a list of items with the predicted class and that could be filtered based on business needs.

However, Instead of simply giving the business the predicted classes, I want to add insights/recommendations as to why a specific item was predicted with class X and how you could go about working on the item to change its class from say X to Y.

How do I go about this? I thought of using feature importance, but my input data shape is [800,000 * 1,050] and I am not sure if it would the best way to proceed.

Are there any existing industry standard methodologies that can add interpretability to such models and convert them from a black box models to prescriptive models?

  • 1
    $\begingroup$ If the features are sparse, you might want to simply use standardized coefficients from logistic regression, or select some individual decision trees. Explaining how can the label change is however a lot more problematic, and an optimization problem of its own. Generally speaking, if you need explanatory ability, you'll have to move away from black-box models. $\endgroup$ Nov 17, 2018 at 15:05

1 Answer 1


Decision tress can be plotted in python, this is the most visualizing machine learning algorithm, you can see a link here: https://medium.com/@rnbrown/creating-and-visualizing-decision-trees-with-python-f8e8fa394176.

For everything else you need to do data exploration again. Try to visualize in bar plots, for example you can show, if you have class 'X' and 'Y', what your confidence intervall of your future 1 if it is class X and what if it is class 'Y'.


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.