Efficient incremental Pareto archive based on BSP
Project description
Archive of non-dominated points
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.
In order to not needing to install Cython, the package uses numpy implementation only
Debuging
python -m venv -r requirements.txt .venv
source .venv/bin/activate
pip install --upgrade pip
python -m pip install -e .[dev]
Testing
# Run tests
PYTHONPATH=src /usr/bin/python -m pytest tests/ -v
# PYTHONPATH=src /usr/bin/python -m pytest tests/ -v
USAGE
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.
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
- Similar problem (SKYLINE) https://github.com/sean-chester/SkyBench
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_paretoarchive-1.0.tar.gz.
File metadata
- Download URL: py_paretoarchive-1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
072ea97c9d280858b1d87b61b775673b393b51f0ebf442acae4aab19083fc64d
|
|
| MD5 |
5871d5855bf26cb61cb9856335fb23af
|
|
| BLAKE2b-256 |
80b912be7e7da33b64c4f6adfca1319a60cde80cb9b4602485e814fc30710545
|
Provenance
The following attestation bundles were made for py_paretoarchive-1.0.tar.gz:
Publisher:
python-publish.yml on ehw-fit/py-paretoarchive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_paretoarchive-1.0.tar.gz -
Subject digest:
072ea97c9d280858b1d87b61b775673b393b51f0ebf442acae4aab19083fc64d - Sigstore transparency entry: 305785800
- Sigstore integration time:
-
Permalink:
ehw-fit/py-paretoarchive@8864e07e60218853d98de21f2dc2da3bf8460443 -
Branch / Tag:
refs/tags/v1.0 - Owner: https://github.com/ehw-fit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8864e07e60218853d98de21f2dc2da3bf8460443 -
Trigger Event:
release
-
Statement type:
File details
Details for the file py_paretoarchive-1.0-py3-none-any.whl.
File metadata
- Download URL: py_paretoarchive-1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e65b87a7af91843465dc062604ea9e0c78309bbeb9f4298196bb3040d1f86ad4
|
|
| MD5 |
fae9e8bcdc4038e2c3be2549fc01075f
|
|
| BLAKE2b-256 |
ea6e8af758d8e0acb429f58638b7a68a837a49e11f90c957b44b00211b0578a5
|
Provenance
The following attestation bundles were made for py_paretoarchive-1.0-py3-none-any.whl:
Publisher:
python-publish.yml on ehw-fit/py-paretoarchive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_paretoarchive-1.0-py3-none-any.whl -
Subject digest:
e65b87a7af91843465dc062604ea9e0c78309bbeb9f4298196bb3040d1f86ad4 - Sigstore transparency entry: 305785808
- Sigstore integration time:
-
Permalink:
ehw-fit/py-paretoarchive@8864e07e60218853d98de21f2dc2da3bf8460443 -
Branch / Tag:
refs/tags/v1.0 - Owner: https://github.com/ehw-fit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8864e07e60218853d98de21f2dc2da3bf8460443 -
Trigger Event:
release
-
Statement type: