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.2) https://doi.org/10.5281/zenodo.20707572

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

Metadata

Release files for icspylab 1.0.2

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.2
File Interpreter ABI Platform Actions
icspylab-1.0.2-py3-none-any.whl Python 3 none any Details for icspylab-1.0.2-py3-none-any.whl

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

Download URL icspylab-1.0.2-py3-none-any.whl
Size 46.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
632a9df6f31f57c2e5adbce40cd8d4d47eeb3c67acb1dac88e175a44215d1aab
BLAKE2b-256 checksum
How to use checksums
ccd0dead44f265e512f4ee29f00ef9d52b1273c5dd5727ce30c28e5ad91d3975
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Security for icspylab 1.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

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