Metadata-Version: 2.4
Name: gradual-mining
Version: 0.3.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Dist: numpy>=1.20.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: gradual-mining[fuzzy,dev] ; extra == 'all'
Requires-Dist: pytest>=7.0 ; extra == 'dev'
Requires-Dist: pytest-cov>=3.0 ; extra == 'dev'
Requires-Dist: black>=22.0 ; extra == 'dev'
Requires-Dist: mypy>=0.950 ; extra == 'dev'
Requires-Dist: ruff>=0.1.0 ; extra == 'dev'
Requires-Dist: scikit-fuzzy>=0.4.0 ; extra == 'fuzzy'
Requires-Dist: ypstruct>=0.0.2 ; extra == 'fuzzy'
Provides-Extra: all
Provides-Extra: dev
Provides-Extra: fuzzy
Summary: Unified Python package for gradual pattern mining with multiple algorithms
Keywords: data mining,pattern mining,gradual patterns,knowledge discovery,frequent itemsets
Author: Gradual Mining Team
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# GPMF — Gradual Pattern Mining Framework

A Python library for gradual pattern mining with a unified scikit-learn-style API.

## Installation

```bash
pip install gradual-mining
```

Pre-built wheels are available for Linux, macOS and Windows (x86_64 and arm64). The ParaMiner algorithm includes an optional Rust extension for multi-core acceleration — it is compiled into the wheel automatically and falls back to a pure-Python implementation if unavailable.

## Quick start

```python
from gpmf.algorithms.graank import GRAANK

model = GRAANK(min_support=0.5)
patterns = model.mine("data.csv")

for p in patterns:
    print(p.to_string(), ":", p.support)
```

All algorithms share the same interface:

```python
model.fit(data)              # data can be a CSV path, DataFrame, or GradualDataset
patterns = model.get_patterns()
result   = model.get_result()  # includes execution time, metadata
```

### ParaMiner with Rust acceleration

```python
from gpmf.algorithms.closed.paraminer_algorithm import ParaMiner

model = ParaMiner(min_support=0.5, use_rust=True, num_threads=4)
patterns = model.mine("data.csv")
```

## Available algorithms

| Algorithm | Key | Authors | Reference |
|-----------|-----|---------|-----------|
| **GRAANK** | `graank` | Laurent, Lesot & Rifqi (2010) | [paper](https://www.lirmm.fr/~laurent/POLYTECH/IG4/DM/RessourcesProjet/LaurentLesotRifqi.pdf) |
| **GRITE** | `grite` | Di-Jorio, Laurent & Teisseire (2009) | [paper](https://hal.inrae.fr/hal-02592797v1) |
| **SGrite** | `sgrite` / `sgopt` / `sg1` / `sgb1` / `sgb2` | Tayou Djamegni, Tabueu Fotso & Kenmogne (2021) | [paper](https://doi.org/10.1016/j.mlwa.2021.100068) |
| **ParaMiner** | `paraminer` | Négrevergne, Termier, Rousset & Méhaut (2014) | [paper](https://doi.org/10.1007/s10618-013-0313-2) |
| **ACO-GRAANK** | `ant-graank` | Owuor, Laurent & Orero (2019) | [paper](https://doi.org/10.1109/FUZZ-IEEE.2019.8858883) |
| **TGrad** | `tgrad` | Owuor, Laurent & Orero (2019) | [paper](https://doi.org/10.1109/FUZZ-IEEE.2019.8858883) |
| **MSGP** | `msgp` | Lonlac, Doniec, Lujak & Lecoeuche (2020) | [paper](https://doi.org/10.1007/978-3-030-59065-9_16) |
| **GLCM** | `glcm` | Do, Termier, Laurent et al. (2015) | [paper](https://hal-lirmm.ccsd.cnrs.fr/lirmm-01381085v1) |
| **PGLCM** | `pglcm` | Do, Termier, Laurent et al. (2015) | [paper](https://hal-lirmm.ccsd.cnrs.fr/lirmm-01381085v1) |

### Pruning criterion

| Criterion | Applies to | Authors |
|-----------|-----------|---------|
| Row–Column pruning (`--use-rc-pruning`) | GRITE, SGrite, GLCM | Kamga Nguifo, Lonlac, Fleury & Mephu Nguifo (2025) — [paper](https://doi.org/10.1109/FUZZ62266.2025.11152072) |

## CLI

```bash
# List available algorithms
gradual-mine --list

# Mine patterns
gradual-mine graank data.csv --min-support 0.5

# Save results
gradual-mine graank data.csv --min-support 0.5 --output results.json --csv results.csv

# Parallel execution
gradual-mine paraminer data.csv --min-support 0.5 --n-jobs -1
```

## Development

```bash
git clone https://github.com/your-org/gpmf
cd gpmf
uv sync --dev
uv run pytest
```

To build with the Rust extension locally:

```bash
pip install maturin
maturin develop --release
```

## License

MIT

