Picard : Preconditioned ICA for Real Data
This repository hosts Python/Octave/Matlab code of the Preconditioned ICA for Real Data (Picard) and Picard-O algorithms.
See the documentation.
Algorithm
Picard is an algorithm for maximum likelihood independent component analysis. It shows state of the art speed of convergence, and solves the same problems as the widely used FastICA, Infomax and extended-Infomax, faster.
The parameter ortho choses whether to work under orthogonal constraint (i.e. enforce the decorrelation of the output) or not. It also comes with an extended version just like extended-infomax, which makes separation of both sub and super-Gaussian signals possible. It is chosen with the parameter extended.
ortho=False, extended=False: same solution as Infomax
ortho=False, extended=True: same solution as extended-Infomax
ortho=True, extended=True: same solution as FastICA
ortho=True, extended=False: finds the same solutions as Infomax under orthogonal constraint.
Installation
We recommend the Anaconda Python distribution.
conda
Picard can be installed with conda-forge. You need to add conda-forge to your conda channels, and then do:
$ conda install python-picard
pip
Otherwise, to install picard, you first need to install its dependencies:
$ pip install numpy matplotlib scipy
Then install Picard with pip:
$ pip install python-picard
or to get the latest version of the code:
$ pip install git+https://github.com/mind-inria/picard.git#egg=picard
If you do not have admin privileges on the computer, use the --user flag with pip. To upgrade, use the --upgrade flag provided by pip.
check
To check if everything worked fine, you can do:
$ python -c 'import picard'
and it should not give any error message.
matlab/octave
The Matlab/Octave version of Picard and Picard-O is available here.
Quickstart
To get started, you can build a synthetic mixed signals matrix:
>>> import numpy as np
>>> N, T = 3, 1000
>>> S = np.random.laplace(size=(N, T))
>>> A = np.random.randn(N, N)
>>> X = np.dot(A, S)
And then use Picard to separate the signals:
>>> from picard import picard
>>> K, W, Y = picard(X)
Picard outputs the whitening matrix, K, the estimated unmixing matrix, W, and the estimated sources Y. It means that Y = WKX
NEW: scikit-learn compatible API
Introducing picard.Picard, which mimics sklearn.decomposition.FastICA behavior:
>>> from sklearn.datasets import load_digits
>>> from picard import Picard
>>> X, _ = load_digits(return_X_y=True)
>>> transformer = Picard(n_components=7)
>>> X_transformed = transformer.fit_transform(X)
>>> X_transformed.shape
Dependencies
These are the dependencies to use Picard:
numpy (>=1.8)
matplotlib (>=1.3)
scipy (>=0.19)
Optionally to get faster computations, you can install
numexpr (>= 2.0)
These are the dependencies to run the EEG example:
mne (>=0.14)
Cite
If you use this code in your project, please cite:
Pierre Ablin, Jean-Francois Cardoso, Alexandre Gramfort Faster independent component analysis by preconditioning with Hessian approximations IEEE Transactions on Signal Processing, 2018 https://arxiv.org/abs/1706.08171 Pierre Ablin, Jean-François Cardoso, Alexandre Gramfort Faster ICA under orthogonal constraint ICASSP, 2018 https://arxiv.org/abs/1711.10873
Changelog
New in 0.8 : for the density exp, the default parameter is now alpha = 0.1 instead of alpha = 1.
Metadata
Release files for python-picard 0.8.2
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 | |
|---|---|---|---|---|
| python_picard-0.8.2.tar.gz | 65.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_picard-0.8.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.1 kB
Release files / python_picard-0.8.2.tar.gz
| Download URL | python_picard-0.8.2.tar.gz |
|---|---|
| Size | 65.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42259763f87673837dcc2772cc941139c8ee547093d1b970e95097393c628cde
|
|
BLAKE2b-256 checksum How to use checksums |
a14bcd049f1c742cd6005b3c2758b1568149da2f27d5e1b90ecfe662d5e52b82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.
Transparency logRelease files / python_picard-0.8.2-py3-none-any.whl
| Download URL | python_picard-0.8.2-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21d5762f40cef179596dd1eb66bbfd7518da8ae2a7ab772d864834fbe6dcd006
|
|
BLAKE2b-256 checksum How to use checksums |
447505ebe70bd6836877aaf60ac25db926041a806984d373d084d61092bc3cc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.
Transparency logSecurity for python-picard 0.8.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for python_picard-0.8.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.
Transparency logA 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.