Splits the rows into folds and predicts \(\hat\eta_{\mathrm{obs}}\) and
\(\hat r\) for each fold from models fitted on the other folds, as
sharp_scan_ci() requires. The learner is yours: fit_eta and fit_r
are functions that fit on a training frame and return probabilities for
new rows. fit_eta receives only the observed rows of the training folds.
Arguments
- data
A data frame with all rows, observed and unobserved.
- response
Name of the response indicator column (0/1 or logical).
- fit_eta
function(train, newdata)returning \(P(Y = 1 \mid X, R = 1)\) fornewdata;trainholds observed rows.- fit_r
function(train, newdata)returning \(P(R = 1 \mid X)\).- folds
Number of folds. Default 5.
- seed
Optional seed for the fold assignment.
- clip
Predictions are clipped to
[clip, 1 - clip]. Default 1e-6.
