Skip to main content

Python port of the seminrExtras R package: supplementary PLS-SEM evaluation and validation tools (CVPAT, PCM, cIPMA, COA, NCA, CTA-PLS, FIMIX-PLS, PLS-POS, congruence)

Project description

seminrExtras (Python)

Python port of the seminrExtras R package: supplementary tools for evaluating and validating PLS-SEM (partial least squares structural equation) models, built on the seminr estimation engine.

Every feature is validated for numerical parity against the R package on R-generated golden fixtures (1e-5 default tolerance; injected R random streams for resampling-based features).

Installation

pip install seminrExtras            # core
pip install "seminrExtras[plot]"    # + matplotlib for the plot layer
pip install "seminrExtras[pandas]"  # + pandas-friendly input

Requires Python >= 3.11 and seminr >= 0.2.1 (installed automatically).

Features

Mirroring the R package, evaluated over an already-estimated seminr model:

Feature Functions
Cross-Validated Predictive Ability Test (CVPAT) assess_cvpat, assess_cvpat_compare
Predictive Contribution of the Mediator (PCM) assess_pcm
(Combined) Importance-Performance Map Analysis assess_ipma, assess_cipma
Composite Overfit Analysis (COA) assess_coa, predictive_deviance, deviance_tree, unstable_params, group_rules, competes
Necessary Condition Analysis (NCA) assess_nca, assess_nca_esse
Confirmatory Tetrad Analysis (CTA-PLS) assess_cta
FIMIX-PLS (latent-class segmentation) assess_fimix, assess_fimix_compare
PLS-POS (prediction-oriented segmentation) assess_pos, assess_pos_compare, pos_segments
Congruence testing congruence_test

Usage

Specify and estimate a model with seminr, then evaluate it with seminrExtras:

from seminrExtras import assess_cvpat

result = assess_cvpat(model, nboot=200, seed=123)
print(result)              # readable table (R print parity)
result.summarize()         # detailed summary

# Plots (requires the `plot` extra):
from seminrExtras.plotting import plot
fig = plot(result)

Result objects are frozen dataclasses with a readable __str__, a summarize() method, and — via seminrExtras.plotting — matplotlib plots that mirror the R package's plot methods.

Development

uv sync                # install (dev group included)
uv run pytest          # tests
uv run ruff check .    # lint
uv run ruff format .   # format
uv run mypy src        # type-check (strict)

License

GPL-3.0-only, like the R package it ports.

Project details


Download files

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

Source Distribution

seminrextras-0.1.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

seminrextras-0.1.0-py3-none-any.whl (90.2 kB view details)

Uploaded Python 3

File details

Details for the file seminrextras-0.1.0.tar.gz.

File metadata

  • Download URL: seminrextras-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for seminrextras-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fe4e9929802cb7273189de8541925964b353768d17a9a759bdb9f6056aa9738d
MD5 6ba6108b11fc9d3d95291d730dfe64d4
BLAKE2b-256 6642636cf33868fe2935f05d74a22decf93d6c7a665d0ddc676e39ab0533e728

See more details on using hashes here.

Provenance

The following attestation bundles were made for seminrextras-0.1.0.tar.gz:

Publisher: release.yml on sem-in-r/seminrExtras-py

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

File details

Details for the file seminrextras-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for seminrextras-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2498f7e130c3831d9fc67406ea3ae9ddd382cad3ad6ae5cfb35e83b4d90af25c
MD5 bb155112e734858fb36c98b0ae3f5f19
BLAKE2b-256 6f10e378018c7281d350acd75412946f87e880d3e80a394a170d24c7538e42dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for seminrextras-0.1.0-py3-none-any.whl:

Publisher: release.yml on sem-in-r/seminrExtras-py

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page