Creates a proper rset object from BORG cross-validation folds,
enabling direct use with tune::tune_grid(),
tune::fit_resamples(), and other tidymodels infrastructure
without manual conversion.
Arguments
- data
A data frame. Required in all cases because
borg_cvobjects do not store the original data.- folds
A list of lists, each with
trainandtestinteger index vectors. Typically fromborg_cv()$folds. Not needed whencv_objis provided.- cv_obj
A
borg_cvobject. If provided,foldsare extracted from it.
Value
An rset object (inheriting from tbl_df) compatible
with the tidymodels ecosystem. Each row has an rsplit column
containing train/test index information and an id column.
Details
The returned object works directly with tune::tune_grid(),
tune::fit_resamples(), rsample::assessment(), and
rsample::analysis(). The folds preserve BORG's spatial/temporal
blocking structure.