plantphys / spectratrait

A tutorial R package for illustrating how to fit, evaluate, and report spectra-trait PLSR models. The package provides functions to enhance the base functionality of the R pls package, identify an optimal number of PLSR components, standardize model validation, and vignette examples that utilize datasets sourced from EcoSIS (ecosis.org)
GNU General Public License v3.0
11 stars 9 forks source link

Adding group stratifying in nComps selection #92

Closed asierrl closed 2 years ago

asierrl commented 2 years ago

A couple of functions to allow to include a stratifying variables in the sampling strategy used for the selection of optimal number of latent variables. pls_permut_by_groups is a changed version of pls::pls_permutation and find_optimal_comp_groups simply implements the use of pls_permut_by_groups instead of pls::pls_permutation. Changes included in find_optimal_comp_groups could be incorporated, instead, in find_optimal_components.

serbinsh commented 2 years ago

Apologies, I have been off a bit the last few days. I will review and test this tomorrow!

serbinsh commented 2 years ago

Superseded by #93