Metadata-Version: 2.1
Name: icspylab
Version: 0.1.0
Summary: Invariant Coordinate Selection (ICS) for multivariate data analysis.
Home-page: https://github.com/cbecquart/ICSpyLab
Author: Colombe Becquart, Abdallah Abdelsameia
Author-email: colombe.becquart@tse-fr.eu, aabdelsameia1@gmail.com
Maintainer: Colombe Becquart
Maintainer-email: colombe.becquart@tse-fr.eu
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: seaborn
Requires-Dist: matplotlib

# 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](https://cran.r-project.org/web/packages/ICS/index.html)
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](https://icspylab.readthedocs.io/en/latest/) for more details.

## Installation

```bash
pip install numpy pandas scipy scikit-learn seaborn matplotlib 
pip install icspylab
```

### Usage

```python
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()
```
