get_train_test_split: Split Data into Training and Testing Sets Based on Indices

View source: R/fitting.R

get_train_test_splitR Documentation

Split Data into Training and Testing Sets Based on Indices

Description

This function divides a given set of conditions into training and testing sets. The division is based on a provided vector of indices, which specify the conditions to be used for testing.

Usage

get_train_test_split(test_inds, conds)

Arguments

test_inds

A numeric vector of indices indicating which elements in conds should be used for the test set.

conds

A list of conditions, where each condition is represented as a separate element.

Value

A list with two elements: train and test. Each element is a list of conditions, where train includes the conditions not indexed by test_inds, and test includes the conditions indexed by test_inds.


kachergis/XSLmodels documentation built on Feb. 25, 2024, 10:43 p.m.