Algorithm 1 Estimating and Evaluating an Individualized Treatment Rule (ITR) using the Same Experimental Data via Cross-Validation
Steps in Algorithm 1 | Function/object | Output |
---|---|---|
1. Split data into K random subsets of equal size (Z1,⋯,Zk) | caret::createFolds() within
estimate_itr() |
dataframe |
2. k ← 1 | ||
3. while k≤K do | for loop in fit_itr() within
estimate_itr() |
|
4. Z−k=[Z1,⋯,Zk−1,Zk+1,⋯,ZK] | trainset object |
training data |
5. ˆf−k=F(Z−k) | modulized functions for each ML algoritms (e.g.,
run_causal_forest() ) within
estimate_itr() |
ITR (binary vector) |
6. ˆτk=ˆτˆf−k(Zk) | compute_qoi() function within
evaluate_itr() |
metrics for fold k |
7. k←k+1 | ||
8. end while | ||
9.return ˆτF=1K∑Kk=1ˆτk, ^V(ˆτF)=v(ˆf−1,⋯,ˆf−k,Z1,⋯,ZK) | PAPEcv() PAPDcv() and
getAupecOutput() functions inside
compute_qoi() function within
evaluate_itr() |
averaging the results across folds |