Skip to main content

Efficient incremental Pareto archive based on BSP

Project description

Archive of non-dominated points

PyPI version fury.io PyPI license PyPI pyversions

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

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

py_paretoarchive-1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_paretoarchive-1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

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

Hashes for py_paretoarchive-1.0.tar.gz
Algorithm Hash digest
SHA256 072ea97c9d280858b1d87b61b775673b393b51f0ebf442acae4aab19083fc64d
MD5 5871d5855bf26cb61cb9856335fb23af
BLAKE2b-256 80b912be7e7da33b64c4f6adfca1319a60cde80cb9b4602485e814fc30710545

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_paretoarchive-1.0.tar.gz:

Publisher: python-publish.yml on ehw-fit/py-paretoarchive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for py_paretoarchive-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e65b87a7af91843465dc062604ea9e0c78309bbeb9f4298196bb3040d1f86ad4
MD5 fae9e8bcdc4038e2c3be2549fc01075f
BLAKE2b-256 ea6e8af758d8e0acb429f58638b7a68a837a49e11f90c957b44b00211b0578a5

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page