Functions to perform sequential mutiblock PLS (SMB-PLS) modeling.
Original codes developed in Matlab by Lauzon-Gauthier et al. and adapted to Python in this package.
Package includes following functions:
-data normalization: normalisation_data, normalisation_data_val.
-block data normalization: normalisation_blocs_cal, normalisation_blocs_val.
-SMB-PLS: smbplsnipals, smbpls_cal, smbpls_exploit.
-Random-subset (RS) cross-validation: rs_cv.
-Predictive performances: VIP, BIP, CalculR, SPELimit, SPECalculation.
Lauzon-Gauthier, J., Manolescu, P., & Duchesne, C. (2018). The Sequential Multi-block PLS algorithm (SMB-PLS): Comparison of performance and interpretability. Chemometrics and Intelligent Laboratory Systems, 180(May), 72–83. https://doi.org/10.1016/j.chemolab.2018.07.005
Call function
model = smbpls_cal(xc,yc,bl,lv)
predictions = smbpls_exploit(xv,yv,bl,model)
Input arguments
- xc (n1,k1): X-blocks concatenated for SMB-PLS calibration.
- yc (n1,ky): Y-block - reference values for calibration dataset.
- xv (n2,k1): X-blocks concatenated for SMB-PLS calibration.
- yv (n2,1): Y-block - reference values for validation dataset.
- bl (list of lists): List of variable indices for each X block. Each sublist corresponds to a block and contains the indices of its variables in the global X-matrix.
- lv (n_blocks,1): Number of latent variables per block.
Outputs
- model (dict): Contains the SMB-PLS model parameters, including scores, loadings and predictions.
Key entries include:
-model['ypred']: Predicted response values from SMB-PLS.
-model['Wsuper']: Super weights matrix (n_blocks, total_latent_variables).
-model['Wblock']: Block weights matrix (matrix per block). - predictions (dict): Contains SMB-PLS prediction results obtained by applying the model to a validation dataset.
-predictions['ypred']: Predicted response on the validation set.
Examples
One full example, along with dataset is provided in folder 'tests' of 'Download Files'.
- Example 1: Grinding flotation simulator dataset (provided by Paris et al.)
Research using SMB-PLS:
Paris, A., Duchesne, C., & Poulin, É. (2021). Establishing multivariate specification regions for incoming raw materials using projection to latent structure models: comparison between direct mapping and model inversion. Frontiers in Analytical Science, 1(November), 1–15. https://doi.org/10.3389/frans.2021.729732.
Paris, A., Duchesne, C., & Poulin, É. (2024). Adjusting plant operating conditions to widen multivariate specification regions for incoming raw materials – An optimization framework. Chemometrics and Intelligent Laboratory Systems, 244(September 2023). https://doi.org/10.1016/j.chemolab.2023.104991.
Paris, A., Duchesne, C., & Poulin, É. (2024). Improving profitability of continuous processes facing raw material variability through data-driven SMB-PLS model-based adaptive control. Computers and Chemical Engineering, 184(October 2023). https://doi.org/10.1016/j.compchemeng.2024.108615.
Compatibility
smb_pls tested on Python 3.11 using the following modules:
- numpy 1.24.4
- matplotlib 3.10.1
- SciPy 1.15.2
Metadata
Release files for smb-pls 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smb_pls-0.0.1.tar.gz | 30.4 kB | Without provenance | Details for smb_pls-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smb_pls-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for smb_pls-0.0.1-py3-none-any.whl |
Total release size: 42.9 kB
Release files / smb_pls-0.0.1.tar.gz
| Download URL | smb_pls-0.0.1.tar.gz |
|---|---|
| Size | 30.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41b086976b56dbbd14e7b86bd4351a0ea89e92a0f95e3ae99540370a6c1eb34a
|
|
BLAKE2b-256 checksum How to use checksums |
2f25a8355c58c4306b3b6899c7ead5ffe89f979b5fa8a544a093437c24ee4c88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.8
|
Release files / smb_pls-0.0.1-py3-none-any.whl
| Download URL | smb_pls-0.0.1-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e56e637a82fa2c01bf34ffa95f92d62ca16a87540ef6d58697c212991475d08
|
|
BLAKE2b-256 checksum How to use checksums |
45b3ca037ea4a2b2725c68e5af0b93b9afaf6d291b2965f1e36ebea8aa9271b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.8
|
Security for smb-pls 0.0.1
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.