Setup hyperparameters for Sparse Partial Least Squares training.
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
)SPLSHyperparameters object.
(Tunable) Integer [1, Inf): Number of latent components.
(Tunable) Numeric [0, 1): Sparsity threshold. Higher values select fewer features.
(Tunable) Numeric [0, 0.5]: Concavity of the surrogate direction vector problem.
Character {"pls2", "simpls"}: Feature selection algorithm (regression only).
Character {"kernelpls", "widekernelpls", "simpls", "oscorespls"}: PLS algorithm used for model fitting (regression only).
Character {"lda", "logistic"}: Classifier fit on the latent components (classification only).
Logical: If TRUE, scale features to unit variance.
Logical: If TRUE, scale the outcome to unit variance (regression only).
Numeric (0, Inf): Convergence tolerance (regression only).
Integer [1, Inf): Maximum number of iterations per component (regression only).
(Tunable) Logical: If TRUE, use Inverse Frequency Weighting in classification.
EDG
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.
spls_hyperparams <- setup_SPLS(k = 3L, eta = 0.7)
spls_hyperparams
Run the code above in your browser using DataLab