A recent focus of causal inference research is the use of machine learning, or data-adaptive algorithms, to weak the model specification assumption.[1]}, [2]}, [3]}, [4]} It is important to highlight that machine learning is not a panacea for causal inference. To demonstrate, consider the use of a random forest classifier, a highly flexible machine learning algorithm, to estimate the propensity scores in Table 1 (notice: other concerns with this approach exist[1]}, [2]}, [3]}). One hyperparameter of random forests is the minimal number of observations in an endpoint, called a leaf. If the minimum leaf hyperparameter is set to 10, the estimated probabilities of \(A=1\)  are close to the logistic model estimates. However, setting the leaf hyperparameter to five instead can result in a division-by-zero because the random forest estimates the probability of \(A=1\)  as zero for those with \(V=0,W=0\) . This low-dimensional example illustrates that even flexible data-adaptive algorithms may require a priori restrictions (through their hyperparameters) for estimation.
