Metadata-Version: 2.4
Name: py-paretoarchive
Version: 1.0
Summary: Efficient incremental Pareto archive based on BSP
Home-page: https://github.com/ehw-fit/py-paretoarchive
Author: Zdenek Vasicek
Author-email: Vojtech Mrazek <mrazek@fit.vutbr.cz>
License: MIT
Project-URL: Homepage, https://github.com/ehw-fit/py-paretoarchive
Project-URL: Repository, https://github.com/ehw-fit/py-paretoarchive
Project-URL: Issue Tracker, https://github.com/ehw-fit/py-paretoarchive/issues
Project-URL: Download, https://pypi.org/project/py-paretoarchive
Classifier: Development Status :: 1 - Planning
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Archive of non-dominated points
[![PyPI version fury.io](https://badge.fury.io/py/py-paretoarchive.svg)](https://pypi.python.org/pypi/py-paretoarchive/)
[![PyPI license](https://img.shields.io/pypi/l/py-paretoarchive.svg)](https://pypi.python.org/pypi/py-paretoarchive/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/py-paretoarchive.svg)](https://pypi.python.org/pypi/py-paretoarchive/)



Previous version (0.21) used to achive of all non-dominated points using Fast Incremental BSP Tree. This package provides a Python wrapper for code provided as [a fast incremental BSP archive](https://www.ini.rub.de/PEOPLE/glasmtbl/code/ParetoArchive/index.html).

In order to not needing to install Cython, the package uses numpy implementation only


#### Debuging
```bash
python -m venv -r requirements.txt .venv
source .venv/bin/activate
pip install --upgrade pip

python -m pip install -e .[dev]
```
#### Testing
```bash
# Run tests
PYTHONPATH=src /usr/bin/python -m pytest tests/ -v  




# PYTHONPATH=src /usr/bin/python -m pytest tests/ -v
```

### USAGE

```python
obj1 = [1, 2, 3]
obj2 = [3, 2, 1]
from paretoarchive import np_pareto
dom = np_pareto(obj1, obj2, minimize=[False, True])
print(dom) # [True, False, True] (first and third points are non-dominated)
```

## Using in Pandas
You can easily use the library to filter a Pandas DataFrame. Note that the selected columns cannot have a "NaN" values (you should use `df.dropna(subset=["c1", "c2"])` function.

```python
from paretoarchive.pandas import pareto
par_df = pareto(df, ["area", "energy", "weight"], minimize=[False, True, True])
```

### SOURCE

* Tobias Glasmachers: **A Fast Incremental BSP Tree Archive for Non-dominated Points**
  * https://link.springer.com/chapter/10.1007/978-3-319-54157-0_18
  * https://www.ini.rub.de/PEOPLE/glasmtbl/code/ParetoArchive/index.html
* Similar problem (SKYLINE)
  https://github.com/sean-chester/SkyBench

