https://github.com/patrickroocks/pypref
Development repository of the pypref package (Skylines in Python)
https://github.com/patrickroocks/pypref
Last synced: 12 months ago
JSON representation
Development repository of the pypref package (Skylines in Python)
- Host: GitHub
- URL: https://github.com/patrickroocks/pypref
- Owner: patrickroocks
- License: gpl-3.0
- Created: 2016-01-13T14:12:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-02-20T18:37:34.000Z (over 5 years ago)
- Last Synced: 2025-02-06T15:53:38.731Z (over 1 year ago)
- Language: Python
- Size: 220 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.rst
- License: LICENSE
Awesome Lists containing this project
README
Database Preferences and Skyline Computation in Python
======================================================
Routines to select and visualize the maxima for a given strict partial
order. This especially includes the computation of the Pareto
frontier, also known as (Top-k) Skyline operator, and some
generalizations (database preferences).
This the Python port of the rPref package.
Package web site: http://p-roocks.de/rpref/index.php?section=pypref
Install and run
---------------
Copy the repository, e.g., in a sub folder of your home directory
::
cd ~
git clone https://github.com/patrickroocks/pypref pypref
Start Python, move to this directory (replace "/home/patrick" by your home directory) and import it:
::
import os
os.chdir("/home/patrick/pypref")
import pypref as p
If everything went well, the following first tiny example should work:
::
mtcars = p.get_mtcars()
pref = p.high("mpg") * p.high("hp")
sky = pref.psel(mtcars)
btg = pref.btg(mtcars)
See pypref-examples.py for more examples.