d.spls.errorcv: Computes the error of a cross validation iteration

d.spls.errorcvR Documentation

Computes the error of a cross validation iteration

Description

The function d.spls.errorcv computes the sum of squared errors of a validation set according to a calibration set cvcal used to fit the Dual-SPLS regression. This function is an internal function used in the cross validation procedure in order to determine the best number of latent variables of any of the Dual-SPLS versions.

Usage

d.spls.errorcv(
  cvcal,
  X,
  Y,
  ncomp,
  dspls = "lasso",
  ppnu = 0.9,
  nu2,
  indG,
  gamma
)

Arguments

cvcal

a numeric vector representing the index of the calibration set to be used in the fitting.

X

a numeric matrix.

Y

a numeric vector representing the response values.

ncomp

a numeric vector of the number of latent numbers to use while computing the errors.

dspls

the norm type of the Dual-SPLS regression applied. Default value is lasso. Options are pls, LS, ridge, GLA, GLB and GLC.

ppnu

a positive real value, in [0,1]. ppnu is the desired proportion of variables to shrink to zero for each component (see Dual-SPLS methodology).

nu2

a positive real value. nu2 is a constraint parameter used in the ridge norm.

indG

a numeric vector of group index for each observation. It is used in the cases of the group lasso norms.

gamma

a numeric vector of the norm \Omega of each w_g in the case of GLB norm.

Value

a numeric vector representing the errors for each fitted model

Author(s)

Louna Alsouki François Wahl

See Also

d.spls.cv,d.spls.lasso


dual.spls documentation built on April 19, 2023, 1:07 a.m.