| Algorithm 1: SHAP Tree Model Shapley Value Calculation Pseudo-Code . |
| Inputs: x,S,tree={v,a,b,t,r,d} |
| Process: |
| 1: if does not belong to an internal node, then |
| 2: return w* |
| 3: elseif |
| 4: if , then |
| 5: if |
| 6: return |
| 7: else return |
| 9: endif |
| 8: else return |
| 9: endif 10: endif |
| Output: |