Coerce various fold specifications into the `dkge_folds` structure used by dkge cross-fitting helpers. Methods may use `fit_or_data` to resolve subject identifiers when necessary.
See also
`vignette("dkge-classification", package = "dkge")` for an example of fold conversion in practice.
Examples
folds <- as_dkge_folds(list(fold1 = 1:2, fold2 = 3:4))
folds$k
#> [1] 2