Metadata-Version: 2.4
Name: dimmer
Version: 1.0.0
Summary: Tools for dimension estimation of pointclouds. Docs available at https://marcelintel.gitlab.io/dimmer/
Author-email: Michael Catanzaro <mike@marcelintel.com>
License: MIT
Project-URL: Documentation, https://marcelintel.gitlab.io/dimmer
Project-URL: Source, https://gitlab.com/marcelintel/dimmer
Requires-Python: <3.13,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md
Requires-Dist: giotto-tda
Requires-Dist: matplotlib
Requires-Dist: numba
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: scikit-dimension
Requires-Dist: scikit-learn
Provides-Extra: ruff
Requires-Dist: ruff<0.16.0; extra == "ruff"
Provides-Extra: testing
Requires-Dist: ipdb; extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Requires-Dist: pytest-html; extra == "testing"
Requires-Dist: pytest-timeout; extra == "testing"
Requires-Dist: pytest-xdist; extra == "testing"
Requires-Dist: toml; extra == "testing"
Provides-Extra: docs
Requires-Dist: griffe<1.0; extra == "docs"
Requires-Dist: jinja2; extra == "docs"
Requires-Dist: quarto; extra == "docs"
Requires-Dist: quartodoc; extra == "docs"
Requires-Dist: setuptools>=42; extra == "docs"
Requires-Dist: toml; extra == "docs"
Dynamic: license-file

<img 
  style="display:block;
    margin-left: auto;
    margin-right: auto;
    width:50%;"
  src="https://gitlab.com/marcelintel/dimmer/-/raw/main/docs/_static/dimmer_logo.gif">

# dimmer

[![pipeline](https://gitlab.com/marcelintel/dimmer/badges/main/pipeline.svg)](https://gitlab.com/marcelintel/dimmer/-/commits/main)
[![coverage](https://gitlab.com/marcelintel/dimmer/badges/main/coverage.svg)](https://gitlab.com/marcelintel/dimmer/-/commits/main)
[![PyPI](https://img.shields.io/pypi/v/dimmer)](https://pypi.org/project/dimmer/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

Tools for dimension estimation of pointclouds. Docs available at https://marcelintel.gitlab.io/dimmer/

Dimmer provides three methods for determining stratifications of point clouds:

1. `GAD` is a particular implementation of the Geometric Anomaly Detection algorithm
   of Stolz, Tanner, Harrington, and Nanda with modifications for performance.
2. `Intersecter` looks for points in the data whose local neighborhoods look like the intersection of planes.
3. `Stratifier` attempts to stratify points into local charts on the space.

These can be used together or separately, and all are written in the style of `scikit-learn` transformers.

## Installation

`dimmer` is pip-installable. From your command line:

```bash
$ pip install dimmer
```

`dimmer` can also be installed from a local copy of the source code. After pulling the code:

```bash
$ source activate .venv/bin/activate # activate your virtual environment, however that may be
$ pip install -e .
```

More local development installs are detailed in `CONTRIBUTING.md`.

## Basic Usage

The `GAD`, `Intersecter`, and `Stratifier` classes are written in the style of `scikit-learn`
transformers. All should be initialized, fit, and then transformed on the
data set in question, as in:

```python
from dimmer import GAD, Intersecter
gad = GAD(radii=(0.2, 0.5), max_dim = 3, n_jobs = 4)
gad_labels = gad.fit_transform(X=data)
intersect = Intersecter(neighbors=(50,120), threshold=0.2/4, n_jobs = 5)
intersecter_labels = intersect.fit_transform(X=data)
```

For more in-depth usage, see the following example notebooks:

- _[Gad usage](https://marcelintel.gitlab.io/dimmer/quarto_notebooks/gad_usage.html)_ shows the basic functionality of the `GAD` class.
- _[Comparative pipeline](https://marcelintel.gitlab.io/dimmer/quarto_notebooks/comparative_pipeline.html)_ shows how `GAD` can be used in conjunction
  with and in comparison to other dimension estimation algorithms of `scikit-dimension`.
- _[Intersecter usage](https://marcelintel.gitlab.io/dimmer/quarto_notebooks/intersecter_usage.html)_ shows the functionality of the `Intersecter` class.
- _[Stratifier usage](https://marcelintel.gitlab.io/dimmer/quarto_notebooks/stratifier_usage.html)_ shows the functionality of the `Stratifier` class.

## Features

- pip installable
- testing suite with pytest
- documentation with quartodoc
- tests and deployment integrated with gitlab CI/CD

## Credits/History

- See `MIGRATION.md`.
