Figure: x

The rPref Package

Database Preferences and Skyline Computation in R

Shiny demos of rPref functions

Here we demonstrate some rPref functions by means of Shiny apps. They can be directly run in RStudio if the Shiny package is installed. Some of these demos also require the ggplot2 package. All packages needed for the following demos can be installed with

install.packages("rPref")
install.packages("shiny")
install.packages("ggplot")
install.packages("rhandsontable") # only needed for the SVM demo

The apps can be directly downloaded and run with the commands given subsequently using RStudio with installed Shiny package. Alternatively, you can download and extract the zip archive, open one of the files (server.r or ui.r) in RStudio with installed Shiny, and click on "Run App".

Level selection in rPref

The Pareto-optimal set is defined as the Level-1 points. The Pareto optima of the remainder are the Level-2 points. The optimal points of the k-th remainder are the Level-(k+1) points. The different levels are visualized in the following Shiny app.

Figure:
Shiny app demonstrating the levels of a preference selection.

Top-k interface of rPref

There are three different top-k parameters for the preference selection in rPref: top, at_least and top_level. This app visualizes the effects of the different top-k selections. Each slider represents one of the top-k parameters and can be separately adjusted, where a value of "0" means that this top-k parameter is inactive. If more than one parameter is active, the connection operator (intersection or union) between them can be chosen.

Figure:
Shiny app demonstrating the top-k interface of rPref.

Preferences vs. Scoring

In this app we compare preferences with linear scoring. The top-k selection for a linear scoring function is defined by the k first points (x,y) of the data set, when ordered by A · x + B · y descendingly. The data set is synthetically generated and consists of 20 points in [0,1]2 with a given correlation value. The Pareto front, maximizing the both dimensions, is also given and can be visually compared to the scoring approach.

Figure:
Shiny app comparing top-k scoring and Pareto optima.

Support vector separation of Pareto optima

This app allows to separate the Pareto optima from the Level-n points by a separation line of a Support Vector Machine (SVM). Similar to the "Preferences vs. Scoring" app, we have 20 points with a correlation value given by the user. Alternatively, the points can be manually edited using the "tuple editor", implemented using the rhandsontable package.

If the separation is possible, then a maximal corridor between the optima and the level-n points is established and the formula is given. If no separation is possible, the error distance is returned. We see that the separation gets more difficult for higher anti-correlation values.

Figure:
Shiny app for separating Pareto-optima from Level-n points by a non-linear function.