Interpretation in Predictive Modeling (XGBoost) I am currently trying to solve a binary classification problem with models. I am running into a bit of trouble with my models. I have tried a number of various ways to go about my code, including classification trees, logistic regression, as well as an xgboosted tree. All of the models have ran, and had various levels of success. My question is that I have a great xgboosted model. However, I am struggling because I have no idea how/where to go to interpret the model. I have done all of the accuracy, sensitivity, specificity, as well as created a ROC Curve already. What I am confused on is if there is a way to interpret classification tree models the same was logistic regression works where we can see independent variables and coefficients for each variable going into the model. Or is there an easier way to actually digest the tree to see what variables are impacting the model? Any advice would greatly be appreicated. If it isn't possible, would the recommendation for predicting the future be to just do a logistic regression model and try and tune it as best as possible even if it isn't as accurate as one of the more advanced tree models. I know how to run the models but I think my understanding is leading to a disconnect as to how the practical approach to use the model to predict the future of the binary result is missing somewhere
 A: The obvious techniques to try in order to"see what variables are impacting the model?" are:

*

*PDP; Partial  dependency plots - primarily used to explain overall behaviour but has extensions that work for individual predictions too (ICE) - Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Conditional Expectation by Goldstein is a good reference )

*LIME;   Local interpretable model-agnostic explanations - primarily used  to explain individual predictions - "Why Should I Trust You?": Explaining the Predictions of Any Classifierby Ribeiro is a good  reference)

*SHAP;  SHapley Additive exPlanations -  primarily used  to explain  individual predictions but works for overall behaviour too - A Unified Approach to Interpreting Model Predictions by Lundberg & Lee is the  main reference but I prefer An Efficient Explanation of Individual Classifications using Game Theory by Strumbelj &  Kononenko)

If you haven't seen it already, check Molnar's Interpretable Machine Learning book. It is amazing work, has greater coverage and will start from the basics and go into more advanced techniques very nicely. It provides a more readable and to-the-point presentation of the papers mentioned  above too.
A: ML models like XGBoost, Random Forest and etc are usually called black box models for the exact same reason you mentioned, that they don't give you an interpretable functional form like statistical models such as logistic regression. However, you can still extract variable importance out of them to get some insight on which of the predictors are more important. Alternatively, you can try partial dependence plots that are model agnostic and can explain how the dependent variable changes with the independent variables. But they are not perfect and they have their own pros and cons. For more information check out this link: https://scikit-learn.org/stable/modules/partial_dependence.html#:~:text=Partial%20dependence%20plots%20(PDP)%20show,the%20'complement'%20features.
Also, nothing stops you to create more complicated interpretable models yourself. For example, you don't have to use the vanilla logistic regression form for your problem. You can extend it by adding interactions, nonlinearity and etc to enhance its flexibility and also performance and keep the interpretability in place. For example, you can check my answer to another question for which I customize a logistic regression to be more flexible: Analyse categorial data where best outcome is middle level
