PLS-SEM compute engine, a maintained fork of plspm-python with advanced analyses (IPMA, PLSpredict, moderation, FIMIX-PLS) and extended metrics (SRMR, d_ULS, HTMT, Q², MGA) powering OpenPLS.
Project description
OpenPLS Engine
The compute engine behind OpenPLS, a Python 3 library for Partial Least Squares Structural Equation Modeling (PLS-SEM).
openpls-engine is a fork of
plspm-python by Jez
Humble (Google). It keeps the original algorithm intact and adds the metrics
and quality criteria that modern PLS-SEM reporting requires: HTMT, SRMR,
d_ULS, adjusted R², BIC, Stone-Geisser Q², Cronbach α, Dijkstra-Henseler ρ,
multi-group analysis, and a progress-streaming long bootstrap. It also ships
advanced analyses that go beyond what plspm-python covers: PLSpredict
out-of-sample validation, IPMA (Importance-Performance Map Analysis),
two-stage moderation, FIMIX-PLS finite-mixture segmentation, and a
quasi-Newton (BFGS) inner-weighting scheme and a Lohmöller PCA
scheme, two new alternatives to the classical centroid, factorial, and
path schemes (five inner-weighting schemes total).
The engine also powers OpenPLS (the hosted web application) and the CLI / Docker self-host distribution planned for the next phase of the roadmap.
Status: pre-release. All planned ports from the OpenPLS web app are in. Numerical alignment with reference implementations is tracked in TODO.md. See CHANGELOG.md for the version history.
Why fork
- Upstream has not seen a release since 2020.
- OpenPLS adds substantial extensions: SRMR, d_ULS, HTMT, Q², adjusted R², BIC, multi-group analysis (MGA), permutation tests, mean replacement, and a long-running bootstrap with BCa confidence intervals.
- The OpenPLS hosted product depends on a single source of truth for the algorithm; a maintained, versioned package makes that practical.
Installation
openpls-engine is published on PyPI. The current line is a pre-release, so
opt in explicitly:
pip install --pre openpls-engine
Or pin a specific version:
pip install openpls-engine==1.0.0
To work from source instead:
git clone https://github.com/jojacobsen/openpls-engine.git
cd openpls-engine
python3 -m pip install -e .
Development
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
pip install -e .
pytest # run the test suite
ruff check . # lint
CI runs lint and tests on Python 3.10 through 3.13 against every push and
pull request against main.
Versioning
openpls-engine follows Semantic Versioning. The
public API is stable as of 1.0.0. Tagged releases (vX.Y.Z) trigger a
GitHub Actions workflow that builds the package and publishes it to PyPI
via OIDC trusted publishing. The version is the single source of truth in
pyproject.toml and is exposed at runtime as
openpls.__version__.
See CHANGELOG.md for the per-version history. 1.0.0
renamed the import namespace from plspm to openpls; consumers upgrading
from 0.7.x must rewrite their imports (see CHANGELOG → Breaking).
Usage
import pandas as pd
from openpls import Plspm
import openpls.config as c
from openpls.scheme import Scheme
from openpls.mode import Mode
satisfaction = pd.read_csv("tests/data/satisfaction.csv", index_col=0)
structure = c.Structure()
structure.add_path(["IMAG"], ["EXPE", "SAT", "LOY"])
structure.add_path(["EXPE"], ["QUAL", "VAL", "SAT"])
structure.add_path(["QUAL"], ["VAL", "SAT"])
structure.add_path(["VAL"], ["SAT"])
structure.add_path(["SAT"], ["LOY"])
config = c.Config(structure.path(), scaled=False)
for lv in ["IMAG", "EXPE", "QUAL", "VAL", "SAT", "LOY"]:
config.add_lv_with_columns_named(lv, Mode.A, satisfaction, lv.lower())
result = Plspm(satisfaction, config, Scheme.CENTROID)
print(result.inner_summary())
print(result.path_coefficients())
License
GNU General Public License v3.0, see LICENSE. Inherited from
upstream plspm-python (also GPL-3.0).
Attribution
This project is a fork of googlecloudplatform/plspm-python by Jez Humble. The upstream R package plspm by Gaston Sanchez and the seminr package by Soumya Ray and Nicholas Danks remain the conceptual references for the algorithm. See ATTRIBUTION.md for details.
OpenPLS is an independent project and not affiliated with Google.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openpls_engine-1.0.0.tar.gz.
File metadata
- Download URL: openpls_engine-1.0.0.tar.gz
- Upload date:
- Size: 74.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29e5ca93b9a8c36940f3d754145feb7505d3498e45d19c9f2ab816e2cfc05975
|
|
| MD5 |
db98b462583de902465a510d50d2ffb0
|
|
| BLAKE2b-256 |
a6f8043b93b17a738e501e331f04b6f7b23a9ced5216da995b3c981f95ee9fa8
|
Provenance
The following attestation bundles were made for openpls_engine-1.0.0.tar.gz:
Publisher:
release.yml on jojacobsen/openpls-engine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openpls_engine-1.0.0.tar.gz -
Subject digest:
29e5ca93b9a8c36940f3d754145feb7505d3498e45d19c9f2ab816e2cfc05975 - Sigstore transparency entry: 1690979096
- Sigstore integration time:
-
Permalink:
jojacobsen/openpls-engine@8d1905a45871aad015b064b51f817d6c04c25240 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/jojacobsen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8d1905a45871aad015b064b51f817d6c04c25240 -
Trigger Event:
push
-
Statement type:
File details
Details for the file openpls_engine-1.0.0-py3-none-any.whl.
File metadata
- Download URL: openpls_engine-1.0.0-py3-none-any.whl
- Upload date:
- Size: 74.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
250f6f51a4c983cdaca0c37dad29ba47fd893f491cf7ca632f9ece53ab8604d6
|
|
| MD5 |
45fb9773707f5db767f0a55655097910
|
|
| BLAKE2b-256 |
5d55c71c2cb4a475295eaceab0004c0440e56442c9b0e4d6c3acd9b5d8b087ed
|
Provenance
The following attestation bundles were made for openpls_engine-1.0.0-py3-none-any.whl:
Publisher:
release.yml on jojacobsen/openpls-engine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openpls_engine-1.0.0-py3-none-any.whl -
Subject digest:
250f6f51a4c983cdaca0c37dad29ba47fd893f491cf7ca632f9ece53ab8604d6 - Sigstore transparency entry: 1690979119
- Sigstore integration time:
-
Permalink:
jojacobsen/openpls-engine@8d1905a45871aad015b064b51f817d6c04c25240 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/jojacobsen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8d1905a45871aad015b064b51f817d6c04c25240 -
Trigger Event:
push
-
Statement type: