Metadata-Version: 2.4
Name: uefds
Version: 0.1.0
Summary: Universal Evolutionary Feature Discovery and Selection Framework
Author: Panhapich Uk
License: MIT
Project-URL: Repository, https://github.com/Pich09/uefds---GA
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24
Requires-Dist: scikit-learn>=1.3
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"

# UEFDS — Universal Evolutionary Feature Discovery and Selection Framework

A domain-agnostic, two-stage evolutionary system for automatic feature
engineering: expression-tree genetic programming discovers candidate
features (Stage 1), then a genetic-algorithm wrapper selects the best
subset for a real model (Stage 2, in progress).

This package currently implements **Stage 1**.

## Install

```bash
pip install -e .
```

(editable install — recommended while you're actively developing this)

For development/testing extras:

```bash
pip install -e ".[dev]"
```

## Quick start

```python
from sklearn.datasets import load_breast_cancer
from uefds import Stage1Config, run_stage1

data = load_breast_cancer()
X, y = data.data, data.target
feature_names = list(data.feature_names)

config = Stage1Config(
    population_size=50,
    n_generations=30,
    task="classification",       # or "regression"
    protected_features=[0],      # optional: guarantee feature 0 never disappears
)

result = run_stage1(X, y, feature_names, config)

print(result["hall_of_fame"].summary(n=10))
```

Run the full example:

```bash
python examples/demo_stage1.py
```

## Package layout

```
src/uefds/
├── operators.py          operator library + operator-learning tracker
├── tree.py                 expression tree chromosome + breeding operators
├── fitness.py               Quality / Diversity / Simplicity scoring
├── hall_of_fame.py         archive + lineage tracking
└── stage1_discovery.py     main generation loop
```

## Status

- [x] Stage 1 — Evolutionary Feature Discovery
- [ ] Compression layer (correlation/MI clustering dedup)
- [ ] Stage 2 — Evolutionary Feature Selection (GA wrapper + XGBoost + SHAP)
- [ ] NSGA-II multi-objective selection mode
- [ ] Validation framework (CV / time-based / out-of-time splits)

## Requirements

- Python >= 3.10
- numpy >= 1.24
- scikit-learn >= 1.3
