ref_crossfit
Usage
ref_crossfit( spec, data, outcomes, folds = 5, strata = NULL, cluster = NULL, id = NULL, uncertainty = c("conditional", "total"), n_draw = NULL, ...)Every reference observation receives a score from a model that did not include that observation. A final deployment model is then refit on all reference rows.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
spec |
A ref_spec. |
data |
Reference data. |
outcomes |
Outcome selection, as in ref_fit(). |
folds |
Number of folds (at least 2). |
strata |
Optional stratification column. Rows with a missing stratum form a stratum of their own. |
cluster |
Optional cluster / subject column. Entire clusters stay in one fold. |
id |
Optional identifier stored on scores. |
uncertainty |
Passed to predict.ref_fit() when the held-outfold is scored, as in ref_assess(). Use "total" to match thepredictive that predict.ref_fit() returns by default, which iswhat a map fitted on these scores by ref_calibrate() will beapplied to. |
n_draw |
Number of coefficient draws when uncertainty = "total".The value is retained as calibration provenance. |
... |
Passed to ref_fit(). |
A ref_scores object with .in_sample = FALSE, .row
indexing rows of data, a per-row crps column, and a .fold
column, plus a deployment fit attribute.