Skip to main content

Preconditoned ICA for Real Data

Project description

Travis Codecov Downloads

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.

Comparison

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

To install the package, the simplest way is to use pip to get the latest release:

$ pip install python-picard

or to get the latest version of the code:

$ pip install git+https://github.com/pierreablin/picard.git#egg=picard

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:

\begin{equation*} Y = W K X \end{equation*}

Dependencies

These are the dependencies to use Picard:

  • numpy (>=1.8)

  • matplotlib (>=1.3)

  • numexpr (>= 2.0)

  • scipy (>=0.19)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-picard-0.4.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

python_picard-0.4-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file python-picard-0.4.tar.gz.

File metadata

  • Download URL: python-picard-0.4.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.8

File hashes

Hashes for python-picard-0.4.tar.gz
Algorithm Hash digest
SHA256 e7359f44ac4c0988faed690b2efaa6ad9424a297e3e2d37433a263ea9dbd537f
MD5 72365fc79641754d88400bdebc7f1c40
BLAKE2b-256 b51d9c265967a110628ae9b27e2b79c059ad0b1da6e51e900c3704d03b8fce8e

See more details on using hashes here.

File details

Details for the file python_picard-0.4-py3-none-any.whl.

File metadata

  • Download URL: python_picard-0.4-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.8

File hashes

Hashes for python_picard-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e2b961f6a5c9494a0240a1a7ed995fc3a8260ffbb2bf47f81d9ae4e7f64e5548
MD5 3c5227cd280c7b3be789aea6c5833d86
BLAKE2b-256 ddc93b3c717ccf9e2525e38edb8ab583e2262ee6f06d0873c2bee08ebfb2a5bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page