Performs K-fold cross-validation for models fitted with
big_pls_cox() or big_pls_cox_gd(). The routine mirrors the behaviour of
the cross-validation helpers available in the original plsRcox
package while operating on big.matrix inputs.
Usage
cv.big_pls_cox(
data,
nfold = 5L,
nt = 5L,
keepX = NULL,
givefold,
allCVcrit = FALSE,
times.auc = NULL,
times.prederr = NULL,
method = c("efron", "breslow"),
verbose = TRUE,
...
)
cv.big_pls_cox_gd(
data,
nfold = 5L,
nt = NULL,
keepX = NULL,
givefold,
allCVcrit = FALSE,
times.auc = NULL,
times.prederr = NULL,
method = c("efron", "breslow"),
verbose = TRUE,
...
)Arguments
- data
A list with entries
x,timeandstatusmatching the arguments ofbig_pls_cox()orbig_pls_cox_gd().xcan be either a numeric matrix/data frame or abigmemory::big.matrix.- nfold
Integer giving the number of folds to use.
- nt
Number of latent components to evaluate.
- keepX
Optional integer vector passed to the modelling function to enforce naive sparsity (see
big_pls_cox()).- givefold
Optional list of fold indices. When supplied, it must contain
nfoldinteger vectors whose union isseq_len(nrow(data$x)).- allCVcrit
Logical; when
FALSE(default) only the recommended integrated AUC computed with survivalROC is returned. WhenTRUE, the 13 additional criteria from plsRcox are also evaluated.- times.auc
Optional time grid used for time-dependent AUC computations. Defaults to an equally spaced grid between zero and the maximum observed time.
- times.prederr
Optional time grid used for prediction error curves. Defaults to the same grid as
times.aucwithout the last ten evaluation points to avoid instabilities.- method
Ties handling method passed to
survival::coxph.- verbose
Logical; print progress information.
- ...
Additional arguments forwarded to the underlying modelling function.
Value
A list containing cross-validation summaries. When allCVcrit = FALSE, the list holds
ntNumber of components assessed.
cv.error10Mean iAUC of survivalROC across folds for 0 to
ntcomponents.cv.se10Estimated standard errors for
cv.error10.foldsFold assignments.
lambda.min10Component minimising the cross-validated error.
lambda.1se10Largest component within one standard error of the optimum.
When allCVcrit = TRUE, the full set of 14 criteria (log partial
likelihood, iAUC variants and Brier scores) is returned together with their
associated standard errors and one-standard-error selections.
Details
The function returns cross-validated estimates for each component
(including the null model) using either big_pls_cox() or
big_pls_cox_gd(), depending on the engine argument. The implementation
reuses the internal indicators (getIndicCV, getIndicCViAUCSurvROCTest)
to provide consistent metrics with the legacy plsRcox helpers.