Partial least squares correlation (PLSC) for M/EEG
mne-plsc is a library for partial least squares correlation (PLSC) analysis of M/EEG data in Python, integrated with the MNE-Python library. The basic computations are performed by the pyplsc library, and the documentation of that library contains some background on the PLSC technique.
Installation
mne-plsc can be installed from the Python Package Index with
pip install mne-plsc
Quickstart
The main functions for model fitting are fit_mc, fit_beh, and fit_within_beh. These return objects whose methods can be used for permutation testing, cluster analysis, and visualization. The typical workflow would be:
1. Fit and visualize model
Perform the initial decomposition and check the patterns of saliences.
from mne_plsc import fit_mc
mod = fit_mc(epochs, condition)
mod.plot_lv(0)
2. Permutation testing
Evaluate which latent variables are significant.
mod.permute(1000)
print(model.summary())
3. Cluster analysis
Perform bootstrap resampling to estimate brain salience z-scores, then cluster strong saliences (e.g., $|z| > 2$).
mod.bootstrap(1000)
mod.cluster(threshold=2)
4. Visualize cluster(s)
Examine the temporal/spectral/spatial distribution of the major clusters for a given set of brain saliences.
mod.plot_cluster_sizes(lv_idx=0)
mod.plot_cluster(lv_idx=0, cluster_idx=0)
5. Extract and export data in cluster(s)
For further analysis, we can extract data at cluster peaks (or averages within clusters) and export to a spreadsheet.
df = mod.get_cluster_data(lv_idx=[0, 1, 2], cluster_idx=[0, 1])
df.to_csv('cluster-data.csv')
See the examples in the documentation for more details.
Metadata
Release files for mne-plsc 0.0.35
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 |
|---|---|---|---|---|
| mne_plsc-0.0.35.tar.gz | 29.9 kB | Without provenance | Details for mne_plsc-0.0.35.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mne_plsc-0.0.35-py3-none-any.whl | Python 3 | none | any | Details for mne_plsc-0.0.35-py3-none-any.whl |
Total release size: 58.5 kB
Release files / mne_plsc-0.0.35.tar.gz
| Download URL | mne_plsc-0.0.35.tar.gz |
|---|---|
| Size | 29.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97e0a35a4d0dc08d478ae150f314ba522bf3b94cbaf22b296bebeb3c3cc30094
|
|
BLAKE2b-256 checksum How to use checksums |
f164f9273eb05f7ce059849edb024b314fcd586cc0f0e78b9328077ae6fd8374
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / mne_plsc-0.0.35-py3-none-any.whl
| Download URL | mne_plsc-0.0.35-py3-none-any.whl |
|---|---|
| Size | 28.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
083f4df0be9473f3ee44ab0c40d5757c2bf0956a4c4753e82583387f13f58aa4
|
|
BLAKE2b-256 checksum How to use checksums |
86b0cfe530833dae0874785c15e43290fdbba48e3649ef6395c55d6b4d2fd292
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for mne-plsc 0.0.35
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.