train_test_split: A Train/Test Split Function

View source: R/Utilities.R

train_test_splitR Documentation

A Train/Test Split Function

Description

This function splits the data into training and testing sets.

Usage

train_test_split(x, y, validation_split)

Arguments

x

(data frame): A data frame of predictors.

y

(list/vector): A list or vector of responses.

validation_split

(numeric): A number between 0 and 1 that represents the proportion of the data to be used for testing.

Value

out (list): A list containing all of the below components...

$train_x (data frame): A data frame of predictors for the training set.

$train_y (list/vector): A list or vector of responses for the training set.

$test_x (data frame): A data frame of predictors for the testing set.


RelimpPCR documentation built on June 7, 2023, 6:22 p.m.