Learn R Programming

mdatools (version 0.13.1)

pcv: Compute matrix with pseudo-validation set

Description

The method computes pseudo-validation matrix Xpv, based on PCA decomposition of calibration set X and systematic (venetian blinds) cross-validation. It is assumed that data rows are ordered correctly, so systematic cross-validation can be applied.

All details can be found in [1]

Usage

pcv(
  x,
  ncomp = min(round(nrow(x)/nseg) - 1, col(x), 20),
  nseg = 4,
  scale = FALSE
)

Value

Pseudo-validation matrix (IxJ)

Arguments

x

matrix with calibration set (IxJ)

ncomp

number of components for PCA decomposition

nseg

number of segments in cross-validation

scale

logical, standardize columns of X prior to decompositon or not

References

1. Kucheryavskiy, S., Zhilin, S., Rodionova, O., & Pomerantsev, A. Procrustes Cross-Validation—A Bridge between Cross-Validation and Independent Validation Sets. Analytical Chemistry, 92 (17), 2020. pp.11842–11850. DOI: 10.1021/acs.analchem.0c02175