Learn R Programming

rtemis (version 1.4.3)

setup_SPLS: Setup SPLS Hyperparameters

Description

Setup hyperparameters for Sparse Partial Least Squares training.

Usage

setup_SPLS(
  k = 2L,
  eta = 0.5,
  kappa = 0.5,
  select = "pls2",
  fit = "simpls",
  classifier = "lda",
  scale_x = TRUE,
  scale_y = FALSE,
  eps = 1e-04,
  maxstep = 100L,
  ifw = FALSE
)

Value

SPLSHyperparameters object.

Arguments

k

(Tunable) Integer [1, Inf): Number of latent components.

eta

(Tunable) Numeric [0, 1): Sparsity threshold. Higher values select fewer features.

kappa

(Tunable) Numeric [0, 0.5]: Concavity of the surrogate direction vector problem.

select

Character {"pls2", "simpls"}: Feature selection algorithm (regression only).

fit

Character {"kernelpls", "widekernelpls", "simpls", "oscorespls"}: PLS algorithm used for model fitting (regression only).

classifier

Character {"lda", "logistic"}: Classifier fit on the latent components (classification only).

scale_x

Logical: If TRUE, scale features to unit variance.

scale_y

Logical: If TRUE, scale the outcome to unit variance (regression only).

eps

Numeric (0, Inf): Convergence tolerance (regression only).

maxstep

Integer [1, Inf): Maximum number of iterations per component (regression only).

ifw

(Tunable) Logical: If TRUE, use Inverse Frequency Weighting in classification.

Author

EDG

Details

Regression is fit with spls::spls and classification with spls::splsda, chosen from the outcome type. Parameters marked "regression only" or "classification only" are passed to the backend that accepts them and ignored by the other.

spls provides no case weights, so ifw cannot be honored: enabling it makes training abort.

Examples

Run this code
spls_hyperparams <- setup_SPLS(k = 3L, eta = 0.7)
spls_hyperparams

Run the code above in your browser using DataLab