man/rmd/pls_mixOmics.md

For this engine, there are multiple modes: classification and regression

Tuning Parameters

This model has 2 tuning parameters:

Translation from parsnip to the underlying model call (regression)

The plsmod extension package is required to fit this model.

library(plsmod)

pls(num_comp = integer(1), predictor_prop = double(1)) %>%
  set_engine("mixOmics") %>%
  set_mode("regression") %>%
  translate()
## PLS Model Specification (regression)
## 
## Main Arguments:
##   predictor_prop = double(1)
##   num_comp = integer(1)
## 
## Computational engine: mixOmics 
## 
## Model fit template:
## plsmod::pls_fit(x = missing_arg(), y = missing_arg(), predictor_prop = double(1), 
##     ncomp = integer(1))

[plsmod::pls_fit()] is a function that:

Translation from parsnip to the underlying model call (classification)

The plsmod extension package is required to fit this model.

library(plsmod)

pls(num_comp = integer(1), predictor_prop = double(1)) %>%
  set_engine("mixOmics") %>%
  set_mode("classification") %>%
  translate()
## PLS Model Specification (classification)
## 
## Main Arguments:
##   predictor_prop = double(1)
##   num_comp = integer(1)
## 
## Computational engine: mixOmics 
## 
## Model fit template:
## plsmod::pls_fit(x = missing_arg(), y = missing_arg(), predictor_prop = double(1), 
##     ncomp = integer(1))

In this case, [plsmod::pls_fit()] has the same role as above but eventually targets mixOmics::plsda() or mixOmics::splsda().

Installing mixOmics

This package is available via the Bioconductor repository and is not accessible via CRAN. You can install using:

  if (!require("remotes", quietly = TRUE)) {
    install.packages("remotes")
  }

  remotes::install_bioc("mixOmics")

Preprocessing requirements

Factor/categorical predictors need to be converted to numeric values (e.g., dummy or indicator variables) for this engine. When using the formula method via \code{\link[=fit.model_spec]{fit()}}, parsnip will convert factor columns to indicators.

Variance calculations are used in these computations so zero-variance predictors (i.e., with a single unique value) should be eliminated before fitting the model.

Predictors should have the same scale. One way to achieve this is to center and scale each so that each predictor has mean zero and a variance of one.

Case weights

The underlying model implementation does not allow for case weights.

References



topepo/parsnip documentation built on April 16, 2024, 3:23 a.m.