Locally-weighted partial least squares (LW-PLS) is a just-in-time learning method that builds a dedicated weighted partial least squares model around every new sample, where training samples are weighted by their similarity to that sample (Kim et al. (2011) <doi:10.1016/j.ijpharm.2011.10.007>). Regression (single or multiple outcomes) and classification (locally weighted partial least squares-discriminant analysis; Bevilacqua and Marini (2014) <doi:10.1016/j.aca.2014.05.057>) are supported. The local models can be robust to outliers, by partial robust M-regression (Serneels et al. (2005) <doi:10.1016/j.chemolab.2005.04.007>), and sparse (Hoffmann et al. (2015) <doi:10.1016/j.chemolab.2015.09.019>). The prediction kernel is written in C++ with 'RcppArmadillo', and the model is integrated with the 'parsnip', 'dials', 'tune' and 'yardstick' packages so it can be used within the 'tidymodels' framework. Diagnostics of the local models (prediction reliability, local regression vectors, robust weights and selected predictors) come with 'ggplot2' plots designed for spectroscopic data.
| Version: | 0.3.0 |
| Depends: | R (≥ 4.1.0) |
| Imports: | cli, dials (≥ 1.2.0), generics, ggplot2 (≥ 3.5.0), hardhat (≥ 1.3.0), parsnip (≥ 1.3.0), Rcpp, rlang (≥ 1.1.0), scales (≥ 1.3.0), stats, tibble, vctrs, yardstick (≥ 1.2.0) |
| LinkingTo: | Rcpp, RcppArmadillo |
| Suggests: | dplyr, knitr, modeldata, plotly, pls, recipes, rmarkdown, rsample, spelling, testthat (≥ 3.0.0), tune (≥ 1.1.0), withr, workflows |
| Published: | 2026-10-18 |
| DOI: | 10.32614/CRAN.package.lwpls (may not be active yet) |
| Author: | Christian L. Goueguel [aut, cre], Hiromasa Kaneko [cph] (reference LW-PLS implementation transcribed in the tests) |
| Maintainer: | Christian L. Goueguel <christian.goueguel at gmail.com> |
| BugReports: | https://github.com/ChristianGoueguel/lwpls/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/ChristianGoueguel/lwpls, https://christiangoueguel.com/lwpls/ |
| NeedsCompilation: | yes |
| Language: | en-US |
| Materials: | README, NEWS |
| CRAN checks: | lwpls results |
| Reference manual: | lwpls.html , lwpls.pdf |
| Vignettes: |
Diagnostic plots for spectroscopy (source, R code) Introduction to lwpls (source, R code) Robust and sparse LW-PLS (source, R code) Choosing a similarity index (source, R code) |
| Package source: | lwpls_0.3.0.tar.gz |
| Windows binaries: | r-devel: not available, r-release: not available, r-oldrel: not available |
| macOS binaries: | r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available |
Please use the canonical form https://CRAN.R-project.org/package=lwpls to link to this page.