find_optimal_components: Applies different methods for the determination of the...

View source: R/find_optimal_components.R

find_optimal_componentsR Documentation

Applies different methods for the determination of the optimal number of PLSR model components

Description

Applies different methods for the determination of the optimal number of PLSR model components

Usage

find_optimal_components(
  dataset = NULL,
  targetVariable = NULL,
  method = "pls",
  maxComps = 20,
  iterations = 20,
  seg = 100,
  prop = 0.7,
  random_seed = 123456789
)

Arguments

dataset

input full PLSR dataset. Usually just the calibration dataset

targetVariable

What object or variable to use as the Y (predictand) in the PLSR model? Usually the "inVar" variable set at the beginning of a PLS script

method

Which approach to use to find optimal components. Options: pls, firstPlateau, firstMin

maxComps

maximum number of components to consider

iterations

how many different permutations to run

seg

For the built-in pls method, how many different data segments to select from the input dataset

prop

proportion of data to preserve for each permutation

random_seed

random seed to use for splitting data

Value

nComps the optimal number of PLSR components

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.