Skip to main content

openpls engine

A modern, maintained Python engine for Partial Least Squares Structural Equation Modeling (PLS-SEM).

CI Coverage PyPI version Python versions License: GPL-3.0-or-later DOI Validation DOI Validation paper (SSRN)

Documentation  ·  Quickstart  ·  API reference  ·  Changelog


openpls-engine is the compute core behind OpenPLS and a standalone PyPI package. It is a maintained fork of plspm-python by Jez Humble (Google), with the original algorithm kept intact and modern PLS-SEM reporting, advanced analyses, and two new inner-weighting schemes layered on top.

Status: stable as of 1.0.0. Public API follows semver. See the changelog for the version history.

Install

pip install openpls-engine

Pin a specific version for reproducible analyses:

pip install openpls-engine==1.10.0

Or work from source:

git clone https://github.com/jojacobsen/openpls-engine.git
cd openpls-engine
python3 -m pip install -e .

Quickstart

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())

fit = Plspm(satisfaction, config, Scheme.CENTROID)
print(fit.inner_summary())
print(fit.path_coefficients())
print(fit.report().reliability())  # alpha, rho_A, rho_C, AVE

See the Quickstart guide for the full walkthrough.

What's inside

Quality criteria — HTMT and HTMT2 (geometric-mean refinement, Roemer et al. 2021), SRMR, d_ULS, Cronbach α, Dijkstra-Henseler ρ_A and ρ_C, adjusted R², BIC, Stone-Geisser Q² (blindfolding), Cohen f² effect sizes, Fornell-Larcker discriminant validity, per-indicator and per-predictor VIF, CTA-PLS (confirmatory tetrad analysis for reflective measurement).

Advanced analyses — PLSc (consistent-PLS bias correction, Dijkstra & Henseler 2015), Gaussian-copula endogeneity test (Park & Gupta 2012; Hult et al. 2018), disjoint two-stage higher-order constructs covering all four canonical types (R-R / R-F / F-R / F-F), IPMA (Importance-Performance Map Analysis), PLSpredict with the complete Shmueli et al. 2019 panel (RMSE / MAE / MAPE, in-sample + out-of-sample, PLS + LM benchmark), two-stage moderation, FIMIX-PLS finite-mixture segmentation, specific indirect effects with bootstrap percentile CIs, multi-group analysis with Henseler permutation tests, MICOM measurement invariance of composites (Henseler, Ringle & Sarstedt 2016) with three-step verdict.

Engine internals — five inner-weighting schemes (Centroid, Factorial, Path plus the new quasi-Newton/BFGS and Lohmöller PCA schemes), mean-replacement missing-value strategy alongside the upstream casewise default, long-running bootstrap with BCa percentile CIs and progress streaming, publication-ready Plspm.report() that bundles every reviewer-standard panel for one-call export.

Documentation

Full docs at openpls.app/engine:

  • Introduction — what the library does and who it is for.
  • Installation — pip and source installs.
  • Quickstart — end-to-end fit on the satisfaction dataset.
  • Core concepts — PLS-SEM, Mode A/B, inner-weighting schemes, missing-value strategies.
  • API reference — the full public surface.
  • Examples — runnable snippets for each advanced analysis.
  • Changelog — version history with per-feature notes.

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__. 1.0.0 renamed the import namespace from plspm to openpls; consumers upgrading from 0.7.x must rewrite their imports (see CHANGELOG → Breaking).

Cite

If you use openpls-engine in academic work, please cite the validation paper alongside the software:

Structured metadata is in CITATION.cff; GitHub renders a "Cite this repository" button from it.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openpls_engine-1.10.0.tar.gz (167.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openpls_engine-1.10.0-py3-none-any.whl (143.2 kB view details)

Uploaded Python 3

File details

Details for the file openpls_engine-1.10.0.tar.gz.

File metadata

  • Download URL: openpls_engine-1.10.0.tar.gz
  • Upload date:
  • Size: 167.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openpls_engine-1.10.0.tar.gz
Algorithm Hash digest
SHA256 199d4aeeacd42d9e9eb088a2bfef45525b8f2aa145bbc8134e05cd1d635832fa
MD5 2cc3bb1e9fa0c47d09fbd18c79cabcae
BLAKE2b-256 6d41b1a8eda2599e6a2de26942375ae8a4bb699fdcb2c7af69362c23bb7c32a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openpls_engine-1.10.0.tar.gz:

Publisher: release.yml on jojacobsen/openpls-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openpls_engine-1.10.0-py3-none-any.whl.

File metadata

  • Download URL: openpls_engine-1.10.0-py3-none-any.whl
  • Upload date:
  • Size: 143.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openpls_engine-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56bf990efdef7d34b539910dca5a5fd3f7f90e3934f2741d8ca8fc9bc85d1281
MD5 41a6f9819c6c827d388553176b59d9eb
BLAKE2b-256 f7b583a2e2ba2c481eeb865686a7d3553a450ff663919a149c00c86d8db6cfcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openpls_engine-1.10.0-py3-none-any.whl:

Publisher: release.yml on jojacobsen/openpls-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.10.0 This release

2 files

1.9.0

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

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