split_data: Partition the data into folds

View source: R/data-utils.R

split_dataR Documentation

Partition the data into folds

Description

This takes a dataset and a split ID and generates two subsets of the data corresponding to a training set and a holdout.

Usage

split_data(data, split_id)

Arguments

data

dataframe

split_id

integer representing the split to construct

Value

Returns an R6 object HTEFold with three public fields:

  • train - The split to be used for training the plugin estimates

  • holdout - The split not used for training

  • in_holdout - A logical vector indicating for each unit whether they lie in the holdout.


tidyhte documentation built on Aug. 14, 2023, 5:08 p.m.