# Enabling Decision Making with the Modified Causal Forest: Policy Trees for Treatment Assignment
## 4 Technical Considerations and Conclusions  
An optimal tree of arbitrary depth is computationally challenging due to its NP-hard nature. However, specifying a particular depth allows for polynomial-time resolution, making the depth of the tree a critical complexity parameter [22]. Typically, estimating optimal trees beyond a depth of 4 (16 leaves) becomes challenging with moderate-sized training data. To improve computational performance, one option is to reduce the depth, sacrificing some efficiency for computational speed (and improved interpretability). Another option is to use sequentially optimal trees. This means building a shallow initial tree, followed by a second shallow tree built from the sub-final leaves of the first one. Building the trees in sequence is much faster than constructing a single, deeper tree of the same overall depth. Alternatively, the minimum leaf size is crucial for performance optimisation. Setting leaf sizes too small can be impractical and increase computation times. Additionally, users can enhance speed by reducing the size of the training data at the cost of amplifying sampling noise. Another approach to enhancing speed is to limit the number of values considered during splitting. For continuous variables, the _mcf_ algorithm evaluates by default only 100 equally spaced values, while it assesses 100 random combinations for categorical variables. Although this approximation improves computational efficiency, it may lead to some loss in accuracy, particularly as the data in the leaf nodes diminishes. Furthermore, like predictive trees, policy trees can also exhibit instability regarding policy rules or welfare estimation. However, how to conduct inference about the stability of policy trees remains an open question in the literature. Ref. [7] proposes a form of cross-validation to evaluate the accuracy of policy learning procedures, and they assess improvements over a random baseline. Similarly, ref. [9] proposes an alternative form of cross-validation and tests whether optimal policy rules perform significantly better than sending all units to the same treatment. While the assessment of policy tree stability is not currently tackled in the present paper, future research efforts may concentrate on developing methods to evaluate this aspect effectively. Figure 6: Allocation rule for an optimal policy tree of depth-4. Note: The policy tree shows the shares of individuals allocated to each treatment. The splitting variables of the tree are gender, age, income quantile, and an indicator for achieved higher education. The final leaves of the trees indicate the treatments and corresponding shares of allocated individuals. LR: low rate, MR: medium rate, HR: high rate. To conclude, this paper contributes to the literature in various ways. First, we demonstrate the functionalities of the _mcf_ policy tree algorithm across diverse fields, including medicine, epidemiology, and business, within both randomised and observational research settings. Second, we provide new empirical results on causal effect heterogeneity and policy learning using well-known data in these scientific fields. We derive our findings using the _mcf_ method to initially compute policy scores based solely on features. Subsequently, these scores are utilised to determine optimal assignment rules, taking into account constraints. Our approach avoids one-hot encoding for categorical features and allows for specifying an approximation parameter dependent on tree depth for features with numerous values. Third, all replication materials, including data and programming codes, can be downloaded from our Github repository (accessed on 10 July 2024). We use the open-source Python package _mcf_ (version 0.5.1). It provides the classes ModifiedCausalForest() for estimation and OptimalPolicy() for decision making. The OptimalPolicy() class presents a notable advantage by providing a practical implementation of policy trees within multi-action settings, facilitating the creation of explainable assignment rules.