Skip to main content

Multiblock Partial Least Squares Package

License Documentation Status JOSS Paper DOI

This is a newly maintained version of the MBPLS software originally developed by Andreas Baum and Laurent Vermue (homepage: https://github.com/DTUComputeStatisticsAndDataAnalysis/MBPLS/). This maintained version has been updated to be compatible with Python 3.8 and later. Lukas Kopecky, April 2026.

An easy to use Python package for (Multiblock) Partial Least Squares prediction modelling of univariate or multivariate outcomes. Four state of the art algorithms have been implemented and optimized for robust performance on large data matrices. The package has been designed to be able to handle missing data, such that application is straight forward using the commonly known Scikit-learn API and its model selection toolbox.

The documentation is available at https://mbpls.readthedocs.io and elaborate (real-world) Jupyter Notebook examples can be found at https://github.com/kopeckylukas/MB-PLS/tree/master/examples

This package can be cited using the following reference.

Baum et al., (2019). Multiblock PLS: Block dependent prediction modeling for Python. Journal of Open Source Software, 4(34), 1190

Installation

  • Install the package for Python3 using the following command. Some dependencies might require an upgrade (scikit-learn, numpy and scipy).
    $ pip install multiblock-pls
  • Now you can import the MBPLS class by typing
    from mbpls.mbpls import MBPLS

Quick Start

Use the mbpls package for Partial Least Squares (PLS) prediction modeling

import numpy as np
from mbpls.mbpls import MBPLS

num_samples = 40
num_features = 200

# Generate random data matrix X
x = np.random.rand(num_samples, num_features)

# Generate random reference vector y
y = np.random.rand(num_samples,1)

# Establish prediction model using 2 latent variables (components)
pls = MBPLS(n_components=2)
pls.fit(x,y)
y_pred = pls.predict(x)

The mbpls package for Multiblock Partial Least Squares (MB-PLS) prediction modeling

import numpy as np
from mbpls.mbpls import MBPLS

num_samples = 40
num_features_x1 = 200
num_features_x2 = 250

# Generate two random data matrices X1 and X2 (two blocks)
x1 = np.random.rand(num_samples, num_features_x1)
x2 = np.random.rand(num_samples, num_features_x2)

# Generate random reference vector y
y = np.random.rand(num_samples, 1)

# Establish prediction model using 3 latent variables (components)
mbpls = MBPLS(n_components=3)
mbpls.fit([x1, x2],y)
y_pred = mbpls.predict([x1, x2])

# Use built-in plot method for exploratory analysis of multiblock pls models
mbpls.plot(num_components=3)

Metadata

Release files for multiblock-pls 1.1.0

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

Source distribution (sdist)

Source distribution for multiblock-pls 1.1.0
File Size Uploaded Provenance Actions
multiblock_pls-1.1.0.tar.gz 23.4 kB Without provenance Details for multiblock_pls-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for multiblock-pls 1.1.0
File Interpreter ABI Platform Actions
multiblock_pls-1.1.0-py3-none-any.whl Python 3 none any Details for multiblock_pls-1.1.0-py3-none-any.whl

Total release size: 46.7 kB

Release files / multiblock_pls-1.1.0.tar.gz

Download URL multiblock_pls-1.1.0.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ded64129da34d4e02062e9016e14243251ecbd5c2b64838eb05522a9101ba5f6
BLAKE2b-256 checksum
How to use checksums
88c37336afca7d94fc4d941f48ebc6bfc0f9a0892959a1d787f3027d28042f01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / multiblock_pls-1.1.0-py3-none-any.whl

Download URL multiblock_pls-1.1.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e77ec5a0169e851de7a4f1172713216302c90b9c8dfdfaf90b6a0548ce8a4cf0
BLAKE2b-256 checksum
How to use checksums
3538a2a75e313e3d3229100eda24c16f32303d4c567a23b1534504360cfdbe25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for multiblock-pls 1.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files No provenance

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