# Enabling Decision Making with the Modified Causal Forest: Policy Trees for Treatment Assignment
## 2 Framework  
The _mcf_ package is a forest-based causal machine learning algorithm that produces consistent and asymptotically normal treatment effect estimates for various levels of granularity in randomised control trials and in observational studies. In observational studies, identifying causal effects requires several key assumptions: ignorability, overlap, the stable unit treatment value assumption, and exogeneity of features (see [12] for detailed explanations of these assumptions). When the assumptions are satisfied, causal effects can be identified at different aggregation levels. These include average potential outcomes (APO), the average treatment effect (ATE), conditional average treatment effects like individualised average treatment effects (IATEs), and grouped aggregates of these effects. The IATEs represent the average effects for the most granular sub-groups, characterised by specific realisations of the available exogenous features. Evaluating the IATEs enables the detection of potential heterogeneous effects across sub-groups of the population. Observing such heterogeneity indicates that certain individuals may benefit more or less from a particular treatment, highlighting the need to refine treatment assignment mechanisms and subsequently inform policy recommendations. Such refinement can be achieved through policy learning by defining the objective of an optimal assignment rule. Following the framework of [9] for optimal allocations with multiple treatments, let \(\pi(X_{i})\) denote a policy rule mapping individuals to programmes based on their characteristics \(X_{i}\). Each policy rule is part of a candidate set denoted by \(\Pi\), where the objective is to maximise the policy value function \(Q(\pi)=\mathbb{E}[Y_{i}^{\pi(X_{i})}]\). This function represents the average population outcome when employing policy rule \(\pi\) for programme assignment, aiming to find the rule that maximises the average outcome across the population. To find the optimal policy rule within the policy tree class \(\pi\), we introduce the OptimalPolicy() class of the mcf package. This class explores the space of decision trees to maximise a value function \(Q(\pi)\) using individual policy scores such as potential outcomes or IATEs. The algorithm conducts exhaustive and recursive searches across pre-specified variables and values, assigning all observations in a terminal leaf node to a single treatment. This approach ensures that policy decisions are based on maximising the identified causal effects within relevant sub-groups, thereby enhancing the precision and effectiveness of policy recommendations. Algorithm 1 illustrates, in a simplified way, how the tree-search algorithm works. To introduce it, we can assume the following notation: For \(i\) observations, \(X_{i}\) represents the features, specifically, \(p_{1}\) is the number of ordered features and \(p_{2}\) is the number of unordered features; \(j\in\{0,\ldots,D\}\) is the treatments space; \(\hat{\Theta}_{i}\) is the vector (or matrix) of policy scores for each observation \(i\); \(\hat{\Theta}_{i}(j)\) is the potential outcome for each observation for each treatment \(j\); and the associated sum is the reward \(\mathcal{R}\). Finally, \(L\) is an integer indicating the depth of the tree plus one. The module optpolicy_pt_eff_functions.py (accessed on 10 July 2024) gives more details on the algorithm.