plskit (Python)
Python wrapper for plskit — Partial Least Squares with modern
inference (canonical percentile CIs, split_exact, split_nb), backed
by a Rust engine.
Part of the plskit project — the Rust core, sibling wrappers (R and Julia, planned), shared test corpus, issues, and PRs all live there.
Install
pip install plskit
Wheels are built for Linux, macOS, and Windows on recent Python
versions (>=3.10). When a wheel is unavailable for your platform,
pip falls back to building from the source distribution, which
requires a working Rust toolchain.
A 60-second look
import numpy as np
import plskit
X = np.random.default_rng(0).normal(size=(200, 20))
y = X[:, :3].sum(axis=1) + np.random.default_rng(1).normal(size=200)
# Fit at fixed K, or let plskit pick K via cross-validation.
model = plskit.pls1_fit(X, y, k=3, seed=42)
optimal = plskit.pls1_fit(X, y, k="optimal", k_max=10, seed=42)
y_hat = plskit.pls1_predict(model, X_new=X[:5])
# Confirmatory test at the pre-specified K.
sig = plskit.pls1_confirmatory_test(
X, y, k=3,
method="split_nb", args={"n_splits": 50}, seed=42,
)
print(sig.pvalue, sig.statistic)
PLS1 (single continuous y) is the only family available in v0.1;
PLS2, PLS3 / PLSSVD, and multi-block follow.
Public surface
Functions: preprocess, pls1_fit, pls1_predict,
pls1_confirmatory_test, pls1_find_k_optimal,
pls1_find_k_sequence, pls1_perm_null, pls1_rotation_stability,
rotate.
Result types: PreprocessResult, PLS1Result,
ConfirmatoryTestResult, FindKOptimalResult, FindKSequenceResult,
PermNullResult, RotationStabilityResult, RotateResult,
RotationSpec, CIScalar, ConfirmatoryCI. All are frozen
dataclasses and carry the inputs and seed that produced them.
Errors raised by the Rust engine surface as plskit.PlsKitError
(with PlsKitInvalidWeights and PlsKitResamplingDegenerate
subclasses) and carry a stable .code for programmatic handling.
This is a thin wrapper
All numerical work runs inside the plskit Rust crate. The Python
package converts inputs to f64, calls the engine, and wraps the
result. Bug reports and feature requests belong on the
monorepo issue tracker.
Citation
Lenartowicz, P., Plisiecki, H. (2026). Cheap Per-Component Testing for PLS, Stable Under Rotation (Under Review).
License
GPL-3.0-or-later.
Metadata
Release files for plskit 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| plskit-0.5.0.tar.gz | 237.6 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plskit-0.5.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| plskit-0.5.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| plskit-0.5.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 3.9 MB
Release files / plskit-0.5.0.tar.gz
| Download URL | plskit-0.5.0.tar.gz |
|---|---|
| Size | 237.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
821a0149134d310a24ab037b609b8694c570cf90d7182a396391885ab423a37e
|
|
BLAKE2b-256 checksum How to use checksums |
53c499755def2b1ead0a4955bb82424f79998687734af9e6b989002e3ecdfba3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 7, 2026.
Transparency logRelease files / plskit-0.5.0-cp310-abi3-win_amd64.whl
| Download URL | plskit-0.5.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ce09f3a6d8efcac92c35845137adcb3d587456243439897866c945a6dc30b420
|
|
BLAKE2b-256 checksum How to use checksums |
b45a338b10130b0eafd487afb66ab85596c1262fda6639021e0ec0e29d06ca46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 7, 2026.
Transparency logRelease files / plskit-0.5.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | plskit-0.5.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e58872c2cb69fc8eb2793ffceeea23d6c8f55894e52ca4c2e1ebb6219f3926a9
|
|
BLAKE2b-256 checksum How to use checksums |
23985a666c2fbd4d7c18bbad6230989ef068f3149df5dcad58a0891fe33f8202
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 7, 2026.
Transparency logRelease files / plskit-0.5.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | plskit-0.5.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 914.9 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7fddfa1ca3279264dcbbe12482bc7c2226ad35c6066b7a7ac79241014316f90e
|
|
BLAKE2b-256 checksum How to use checksums |
9379d744f7f3fbef9fc95e9ada522b48a5bbba593c62f489218d6de742275cde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 7, 2026.
Transparency log