Skip to content

Development repository of the pypref package (Skylines in Python)

License

Notifications You must be signed in to change notification settings

patrickroocks/pypref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Development repository of the pypref package (Skylines in Python)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages