Skip to main content

ICSpyLab

Overview

Invariant Coordinate Selection (ICS) is a data transformation method. It transforms the data, via the simultaneous diagonalization of two scatter matrices, into an invariant coordinate system or independent components, depending on the underlying assumptions. It is particularly useful for dimension reduction. Unlike PCA, ICS is not based on variance maximization but on the maximization/minimization of a generalized kurtosis, and it is invariant not only to orthogonal data transformations but to any affine transformation.

This package brings the main functionalities of the ICS R package to Python, offering tools for identifying and selecting invariant coordinates in multivariate data. It includes various covariance estimators, transformation settings, and plotting utilities. Our extensive testing ensures results consistent with the R package, making it easy for users to transition from R to Python or start fresh with ICS.

Check out the documentation for more details.

Installation

Install the package using pip:

pip install icspylab

Usage

from icspylab import ICS, cov, covW
from sklearn.datasets import load_iris

# Load dataset
iris = load_iris()
X = iris.data

# Instantiate ICS object
# ics = ICS() # default parameters
ics = ICS(S1=cov, S2=covW, algorithm='standard', S2_args={'alpha': 1, 'cf': 2})

# Fit and transform the ICS model (equivalent of the function ICS-S3() from the R package ICS)
ics.fit_transform(X)

# Printing a summary
ics.describe()

Examples

All examples and figures shown in the documentation are reproducible and available as standalone Python scripts in the examples/ directory.

🤝 Contributing

We welcome contributions of all kinds, including bug fixes, new features, and documentation improvements.

To get started, please check out our CONTRIBUTING.md guide.

Testing

The default CI workflow executes the full testing suite on Linux and macOS, including validation against the reference R implementation.

On Windows, the CI workflow runs the Python test suite only, without the R-based comparison tests, due to platform-specific constraints in the testing environment.

Citation

If you use this software, please cite:

Becquart, C. and Abdelsameia, A. (2026). ICSpyLab (Version 1.0.1) https://doi.org/10.5281/zenodo.20707572

@software{becquart2026,
 author = {Becquart, Colombe and Abdelsameia, Abdallah},
 title = {ICSpyLab},
 year = {2026},
 version = {1.0.1},
 doi = {10.5281/zenodo.20707572}
}

Release files for icspylab 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for icspylab 1.0.1
File Interpreter ABI Platform
icspylab-1.0.1-py3-none-any.whl Python 3 none any Details

Release files / icspylab-1.0.1-py3-none-any.whl

Download URL icspylab-1.0.1-py3-none-any.whl
Size 47.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa5956c04abc78e14d1f09d3455efa117b4d54185b79b96ca42187f70609afdf
BLAKE2b-256 checksum
How to use checksums
1e7e83d81c7fff466480aa79008beed6cfea21a647e063f6d1969537d04f69ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page