find_optimal_comp_by_groups | R Documentation |
Uses the firstMin and firstPlateau methods for the determination of the optimal number of PLSR model components, by group (i.e. optimal selection by stratification)
find_optimal_comp_by_groups(
dataset = NULL,
targetVariable = NULL,
method = "firstPlateau",
maxComps = 20,
iterations = 20,
prop = 0.7,
random_seed = 123456789,
group_variables = NULL
)
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: firstPlateau, firstMin |
maxComps |
maximum number of components to consider |
iterations |
how many different permutations to run |
prop |
proportion of data to preserve for each permutation |
random_seed |
random seed to use for splitting data |
group_variables |
group_variables character vector of the form c("var1", "var2"..."varn") providing the factors used for stratified sampling. |
nComps the optimal number of PLSR components
asierrl, Shawn P. Serbin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.