Functions to perform SMB-PLS
Project description
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
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 smb_pls-0.0.1.tar.gz.
File metadata
- Download URL: smb_pls-0.0.1.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41b086976b56dbbd14e7b86bd4351a0ea89e92a0f95e3ae99540370a6c1eb34a
|
|
| MD5 |
6f97eb4e9673f7b3a8c953c7e846fcd8
|
|
| BLAKE2b-256 |
2f25a8355c58c4306b3b6899c7ead5ffe89f979b5fa8a544a093437c24ee4c88
|
File details
Details for the file smb_pls-0.0.1-py3-none-any.whl.
File metadata
- Download URL: smb_pls-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e56e637a82fa2c01bf34ffa95f92d62ca16a87540ef6d58697c212991475d08
|
|
| MD5 |
9e3c9968acbd0627091d2ce0a4822f68
|
|
| BLAKE2b-256 |
45b3ca037ea4a2b2725c68e5af0b93b9afaf6d291b2965f1e36ebea8aa9271b4
|