Fixed support for metrics in which a smaller value is better
Commit accidentally got rid of
this. Whoops! On the plus side, the new implementation is much neater
@@ -81,8 +81,10 @@ for ds, fn_out in args.dataset:
# Plot Pareto frontier
xs, ys = [], []
last_x = xm["worst"]
+ comparator = \
+ (lambda xv, lx: xv > lx) if last_x < 0 else (lambda xv, lx: xv < lx)
for algo, algo_name, xv, yv in data:
- if xv > last_x:
+ if comparator(xv, last_x):
last_x = xv
xs.append(xv)
ys.append(yv)
