Skip to contents

A model dominates another if it is at least as good on every criterion and strictly better on at least one. Models that no other model dominates form the Pareto front (front 1). These are the defensible choices: each is a different trade-off between the criteria. Removing front 1 and repeating gives front 2, and so on (non-dominated sorting, as in NSGA-II).

Usage

pareto_rank(
  x,
  maximize = "AUC",
  minimize = "MAE",
  zero = NULL,
  weights = NULL,
  tol = 0,
  one = NULL
)

Arguments

x

A data.frame with one row per model.

maximize

Character vector of columns where larger is better.

minimize

Character vector of columns where smaller is better.

zero

Character vector of columns where values closer to 0 are better (e.g. bias).

weights

Optional named numeric vector of criterion weights (names must match maximize/minimize); missing names get weight 1.

tol

Differences smaller than this count as ties: one number for all criteria or a named vector, e.g. c(AUC = 0.01, MAE = 0.005). Default 0 (strict Pareto dominance).

one

Character vector of columns where values closer to 1 are better (e.g. calibration_slope).

Value

x with added columns pareto_front (1 = non-dominated) and distance (0 = ideal), sorted by front then distance.

Details

Within and across fronts, models are also scored by their Euclidean distance to the ideal point, the hypothetical model that is best on every criterion. Criteria are first min-max normalised to the range 0 to 1, so AUC and MAE contribute on a comparable scale. weights let you make one criterion count more than another. This is the "compromise programming" (TOPSIS-like) approach to choose a single model from the front.

The function is generic: any number of criteria (e.g. AUC, MAE, TSS, Boyce index, AICc, omission rate) can be used.

Tolerance. Differences of a few thousandths in AUC are usually within sampling noise (compare them with the SD of AUC across folds). With tol > 0, a model is dominated only if another model is better by more than tol on at least one criterion and not worse by more than tol on any, so near-ties no longer remove models from the front.

Limits. The fronts depend on the criteria and their directions only; the compromise distance also depends on the min-max normalisation, which changes when models are added or removed, and on weights. It is a convenience for picking one model from the front, not an objective measure of quality.

References

Deb, K., Pratap, A., Agarwal, S., Meyarivan, T. (2002) A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation 6, 182-197. doi:10.1109/4235.996017

Konowalik, K., Nosol, A. (2021) Evaluation metrics and validation of presence-only species distribution models based on distributional maps with varying coverage. Scientific Reports 11, 1482. doi:10.1038/s41598-020-80062-1

Examples

df <- data.frame(model = c("A", "B", "C", "D"),
                 AUC = c(0.90, 0.85, 0.80, 0.88),
                 MAE = c(0.30, 0.20, 0.25, 0.32))
pareto_rank(df, maximize = "AUC", minimize = "MAE")
#>   model  AUC  MAE pareto_front  distance
#> 2     B 0.85 0.20            1 0.3535534
#> 1     A 0.90 0.30            1 0.5892557
#> 4     D 0.88 0.32            2 0.7211103
#> 3     C 0.80 0.25            2 0.7660323