Skip to main content

Dual-sPLS: Full theory and reimplementation from R to Python

The goal of this repository is to reimplement the paper Dual-sPLS: a family of Dual Sparse Partial Least Squares regressions for feature selection and prediction with tunable sparsity... from R to Python. It can be used both as a learning tool to understand the theory behind the algorithm and as a standalone installable library.

Usage

To start using the repository with the ability to modify it locally, you can clone it:

git clone https://github.com/malerbe/Dual-sPLS.git

and then install it using pip:

cd ./Dual-sPLS
pip install -e . 

To install and use the library without cloning it locally, it is also available on Pypi:

pip install dual-spls

Pypi web page

It is suggested to use the notebook notebooks/predict_simulated.ipynb as a "documentation" to understand how to use different features implemented in the library. Reading the docstrings and the commentaries in the code will allow a better understanding of what the arguments correspond to.

The library also allows the user to generate synthetic data as presented in the paper. To see how to use the generation function, see: notebooks/simulate.ipynb

Learning Path

If your goal is to fully grasp the mechanics behind the algorithms, it is recommended to follow the explanation notebooks in this specific order:

  • Fundamentals: docs/PLS.ipynb

  • Introducing Sparsity: docs/sPLS.ipynb

  • The Dual Approach: docs/Dual_sPLS.ipynb

It is then possible to fully understand the first production implementation src/dual_spls/lasso.py easily as it only uses code already explained and implemented the last docs/Dual_sPLS.ipynb notebook.

Sources and original repository

Metadata

Release files for dual-spls 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dual-spls 0.0.7
File Size Uploaded Provenance
dual_spls-0.0.7.tar.gz 17.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dual-spls 0.0.7
File Interpreter ABI Platform
dual_spls-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 42.7 kB

Release files / dual_spls-0.0.7.tar.gz

Download URL dual_spls-0.0.7.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7bc708597ed5d089904eeed4e74301c51c88532f848d2c3e95e315cbbf57c16b
BLAKE2b-256 checksum
How to use checksums
4d6688f498ba6bc914c97cfd0b876a5c016515ca7745384fed760ab2a5c831f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.

Transparency log

Release files / dual_spls-0.0.7-py3-none-any.whl

Download URL dual_spls-0.0.7-py3-none-any.whl
Size 25.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f85050b6580c41ab78f59e2fa6a037c0ebf8ce1a23f318185efeee40d91d26e5
BLAKE2b-256 checksum
How to use checksums
b7ea3f60255004c1db60b036f54997318fd291558280fbcce6e3df2412ef470b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.

Transparency log

Security for dual-spls 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dual_spls-0.0.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page