Skip to main content

Locally centered contrast functions for scikit-learn FastICA

Project description

icalcc

Locally centered contrast functions for scikit-learn FastICA. Drop-in replacement for sklearn.decomposition.FastICA with bounded LCC-tanh and LCC-exp contrasts, plus polynomial LCC contrasts of order 4, 6, and 8.

from icalcc import ICALCC
ica = ICALCC(n_components=4, K='ltanh', random_state=0)
S_hat = ica.fit_transform(X)

Installation

pip install icalcc

Supported K Values

K Description
'ltanh' Bounded LCC-tanh (robust to heavy tails and skewness)
'lexp' Bounded LCC-exp (maximizes Rényi-2 entropy)
4 Polynomial LCC order 4
6 Polynomial LCC order 6, couples m₃, m₄, m₆
8 Polynomial LCC order 8, couples moments up to order 8
'tanh' Classical logcosh contrast (scikit-learn default)
'exp' Classical Gaussian contrast
'skew' Classical cube contrast

Usage

from icalcc import ICALCC

# Bounded LCC-tanh (recommended for heavy-tailed or skewed sources)
ica = ICALCC(n_components=4, K='ltanh', random_state=0)
S_hat = ica.fit_transform(X)

# Bounded LCC-exp (Rényi-2 entropy interpretation)
ica = ICALCC(n_components=4, K='lexp', random_state=0)
S_hat = ica.fit_transform(X)

# Polynomial LCC order 8 (near-Gaussian sources)
ica = ICALCC(n_components=4, K=8, random_state=0)
S_hat = ica.fit_transform(X)

# Classical FastICA baseline
ica = ICALCC(n_components=4, K='tanh', random_state=0)
S_hat = ica.fit_transform(X)

Convergence tracking

ica.fit(X)
print(ica.converged_)  # True if all components converged

See Also

Requirements

  • Python ≥ 3.9
  • numpy ≥ 1.24
  • scikit-learn ≥ 1.3

Citation

If you use this package, please cite both the software paper and the underlying LCC kernel paper:

@article{saito2026icalcc,
  author  = {Saito, Tetsuya},
  title   = {{ICALCC}: Locally Centered Contrast Functions for
             {FastICA} with {GPU} Acceleration},
  journal = {TechRxiv},
  year    = {2026}
}

@article{saito2026lcc,
  author  = {Saito, Tetsuya},
  title   = {Locally Centered Cyclic Kernels for Higher-Order
             Independent Component Analysis},
  journal = {TechRxiv},
  year    = {2026}
}

License

CC BY 4.0

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

icalcc-0.1.3.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

icalcc-0.1.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file icalcc-0.1.3.tar.gz.

File metadata

  • Download URL: icalcc-0.1.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for icalcc-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7bc45e9ba0b5bdb315cc7cf9aa796c227f78f5489f895f12b2ffdce4421806df
MD5 4f8d79d90c21195c69384d95d3d11d97
BLAKE2b-256 aaa385e3bd48696a213198a7de4c8fc95953652b497071ddef85844dbc0a8a9e

See more details on using hashes here.

File details

Details for the file icalcc-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: icalcc-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for icalcc-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5a92942fe6907188243479309392ae22e499ea3d9fb0f3edc1c58220440e1bd5
MD5 464318f635f988291de86af68ff073dc
BLAKE2b-256 a7e7d11429e54ce98d8ef2cf6475ea0d0f69eac98b433420bd589c4bf4c9ffc9

See more details on using hashes here.

Supported by

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