This is a library to run the Preconditioned ICA for Real Data (PICARD) algorithm  and its orthogonal version (PICARD-O) . These algorithms show fast convergence even on real data for which sources independence do not perfectly hold.
We recommend the Anaconda Python distribution.
Otherwise, to install
picard, you first need to install its dependencies:
$ pip install numpy matplotlib numexpr scipy
Then install Picard:
$ pip install python-picard
If you do not have admin privileges on the computer, use the
with pip. To upgrade, use the
--upgrade flag provided by pip.
To check if everything worked fine, you can do:
$ python -c 'import picard'
and it should not give any error message.
The easiest way to get started is to copy the following lines of code in your script:
>>> import numpy as np >>> from picard import picard >>> N, T = 3, 1000 >>> S = np.random.laplace(size=(N, T)) >>> A = np.random.randn(N, N) >>> X = np.dot(A, S) >>> K, W, Y = picard(X)
Picard outputs the whitening matrix, K, the estimated unmixing matrix, W, and the estimated sources Y. It means that:
 Pierre Ablin, Jean-Francois Cardoso, and 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-Francois Cardoso, and Alexandre Gramfort “Faster ICA under orthogonal constraint” ICASSP, 2018, https://arxiv.org/abs/1711.10873