create_data_split: Create a calibration (training) / validation data split for...

View source: R/create_data_split.R

create_data_splitR Documentation

Create a calibration (training) / validation data split for PLSR model fitting and testing

Description

Create a calibration (training) / validation data split for PLSR model fitting and testing

Usage

create_data_split(
  dataset = NULL,
  approach = NULL,
  split_seed = 123456789,
  prop = 0.8,
  group_variables = NULL
)

Arguments

dataset

input full PLSR dataset to split into cal/val datasets

approach

approach to splitting the dataset. Options: base or dplyr

split_seed

random seed to use for splitting data

prop

the proportion of data to preserve for calibration (e.g. 0.8) and validation (0.2). This sets the calibration proportion

group_variables

Use factor variables to conduct a stratified sampling for cal/val

Value

output_list A list containing the calibration dataset (cal_data) and validation dataset (val_data)

Author(s)

Julien Lamour, Jeremiah Anderson, Shawn P. Serbin


TESTgroup-BNL/PLSR_for_plant_trait_prediction documentation built on Feb. 15, 2025, 2:08 p.m.