MyNixOS website logo
Description

Penalized Partial Least Squares.

Linear and nonlinear regression methods based on Partial Least Squares and Penalization Techniques. Model parameters are selected via cross-validation, and confidence intervals ans tests for the regression coefficients can be conducted via jackknifing. The method is described and applied to simulated and experimental data in Kraemer et al. (2008) <doi:10.1016/j.chemolab.2008.06.009>.

ppls: Penalized Partial Least Squares for Structured and Functional Data

CRAN Status

Introduction

This R package implements a flexible and powerful framework for penalized Partial Least Squares (PPLS), including:

  • B-spline basis transformations of the input data,
  • Construction of penalty matrices,
  • Cross-validation for hyperparameter tuning (lambda, ncomp),
  • Visualization of component effects,
  • Jackknife-based inference (covariance, t-tests),
  • Support for block-wise variable selection and kernel PPLS.

It is particularly suited for high-dimensional, structured, and nonlinear regression problems, such as functional data or spectral data.


Installation

We recommend to install the CRAN version for a stable version of ppls.

install.packages("ppls")

Alternatively, install the development version from GitHub with:

# install.packages("pak") ## If necessary, install "pak" beforehand
pak::pak("vguillemot/ppls")

Example: Fit a Penalized PLS Model with Splines

The following is an example of how use ppls on the cookie dataset included in the package:

library(ppls)

# Load cookie data
data(cookie)
X <- as.matrix(cookie$NIR)
y <- cookie$constituents$fat

# Fit a 2-component kernel PPLS 
fit.kpls <- penalized.pls(
  X = X, y = y,
  kernel = TRUE, 
  ncomp = 2
)

# Predict on train data
yhat <- new.penalized.pls(ppls = fit.kpls, Xtest = X, ytest = y)$ypred

# Plot predicted vs observed
plot(yhat[,1], y, xlab = "Fitted", ylab = "Observed", pch = 16, asp = 1)
abline(0, 1, col = "blue", lty = 2)

References

Kraemer, N., Boulesteix, A.-L., & Tutz, G. (2008).
Penalized Partial Least Squares with Applications to B-Spline Transformations and Functional Data.
Chemometrics and Intelligent Laboratory Systems, 94(1), 60–69.
https://doi.org/10.1016/j.chemolab.2008.06.009

Metadata

Version

2.0.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows