R/helperfuns.R

Defines functions get_tdcfoldids

Documented in get_tdcfoldids

#' Create K-fold indices for TDC data
#'
#' @export

get_tdcfoldids <- function(ids, k=10) {
	folds <- sample(rep_len(1:k, length(unique(ids))))[as.numeric(as.factor(as.character(ids)))]
	return(folds)
}
CYGUBICKO/satpred documentation built on Sept. 10, 2023, 4:10 p.m.