split_data: Helper function to split data into training and test sets

View source: R/dgp-lib-utils.R

split_dataR Documentation

Helper function to split data into training and test sets

Description

Helper function to split data into training and test sets

Usage

split_data(X, y, train_prop = 0.5)

Arguments

X

Data matrix or data frame.

y

Response vector.

train_prop

Proportion of data in training set.

Value

A list of four: "X", "y", "Xtest", and "ytest" containing the training data, training response, test data, and test response, respectively.


Yu-Group/dgpoix documentation built on June 3, 2022, 1:40 a.m.