  Tree ensemble methods provide promising predictions with models difficult to
interpret. Recent introduction of Shapley values for individualized feature
contributions, accompanied with several fast computing algorithms for predicted
values, shows intriguing results. However, individualizing coefficients of
determination, aka $R^2$, for each feature is challenged by the underlying
quadratic losses, although these coefficients allow us to comparatively assess
single feature's contribution to tree ensembles. Here we propose an efficient
algorithm, Q-SHAP, that reduces the computational complexity to polynomial time
when calculating Shapley values related to quadratic losses. Our extensive
simulation studies demonstrate that this approach not only enhances
computational efficiency but also improves estimation accuracy of
feature-specific coefficients of determination.
