index_spliter: Split indices into folds

View source: R/31_pre_processing_functions.R

index_spliterR Documentation

Split indices into folds

Description

Randomly splits a given vector of indices into approximately equal-sized folds.

Usage

index_spliter(array, n_folds = 5)

Arguments

array

A vector of indices (e.g., 1:n) to be split into folds.

n_folds

Integer. Number of folds. Default is 5.

Value

A list of length n_folds, each containing a subset of the shuffled indices.

Examples

index_spliter(1:10, n_folds = 3)


HMC documentation built on June 8, 2025, 10:32 a.m.

Related to index_spliter in HMC...