train_test_split: Train-test split

Description Usage Arguments Value

View source: R/simulation-lib.R

Description

Split the data randomly into a training and test set. NOT exported to the user

Usage

1
train_test_split(xs, ys, split_prop = 0.5)

Arguments

xs

Covariates

ys

Responses

split_prop

Proportion in the training set. Must be between 0 and 1, non-inclusive

Value

A list with elements

xs_train

Training set of covariates

xs_test

Test set of covariates

ys_train

Training set of responses

ys_test

Test set of responses


shiandy/methods1proj documentation built on Dec. 31, 2020, 5:15 a.m.