pare
Pareto frontier and skyline query primitives for multi-objective optimization. Filters sets of items to find non-dominated candidates across multiple metrics.
[]
= "0.1.2"
Quick start
use ParetoFrontier;
// [Relevance, Recency] -- higher is better
let candidates = vec!;
let frontier = try_new.unwrap;
assert_eq!; // D excluded
Mixed objectives
When some objectives should be minimized, construct with explicit directions:
use ;
// accuracy (maximize) vs latency_ms (minimize)
let mut f = new;
f.push;
f.push;
f.push; // dominated by model_b
assert_eq!; // model_c filtered out
Selecting from the frontier
Once you have a frontier, pick a single point with weighted scoring or analyze spread with crowding distance:
use ;
let mut f = new;
f.push;
f.push;
f.push;
// Weighted linear score -- pick the point best matching your preferences
let best = f.best_index.unwrap; // favor first objective
// Crowding distance -- points in sparse regions score higher
let distances = f.crowding_distances;
// Hypervolume -- area dominated by the frontier (quality indicator)
let hv = f.hypervolume;
Convenience functions
For simple cases where you just need non-dominated indices from Vec<f32> points:
use ;
let points = vec!;
let idx = pareto_indices.unwrap; // general N-d
let idx2 = pareto_indices_2d.unwrap; // optimized 2-d path
// k-dominance: a point is dominated only if worse in >= k objectives
let relaxed = pareto_indices_k_dominance.unwrap;
Sensitivity analysis
The sensitivity module computes finite-difference Jacobians and objective redundancy analysis:
use ;
let objectives: = vec!;
let jac = finite_difference_jacobian;
let analysis = analyze_redundancy.unwrap;
// analysis.redundant_pairs -- objectives that move together
Examples
sensitivity_analysis.rs -- Multi-objective sensitivity analysis for a simulated 3-arm experiment with 9 covariate cells and 6 objectives. Builds a finite-difference Jacobian across the full parameter space, computes the eigenvalue spectrum to find how many objectives actually matter (effective dimensionality), identifies redundant pairs via cosine similarity, and reports which objectives can be dropped without losing decision power. Useful when you suspect your objective set is over-specified.
For background on dominance, crowding distance, and hypervolume, see
TECHNICAL_BACKGROUND.md.
License
MIT OR Apache-2.0