pub fn r2_indicator(
approx_front: &[Vec<f64>],
weight_vectors: &[Vec<f64>],
reference_point: &[f64],
utility: R2Utility,
) -> f64Expand description
R2 quality indicator.
Evaluates a Pareto front approximation using a set of reference weight vectors and a scalarizing utility function. Defined as:
R2(A, Λ, z*) = (1/|Λ|) Σ_{λ ∈ Λ} min_{a ∈ A} u(a | λ, z*)
A lower R2 value indicates a better approximation (closer to ideal).
§Arguments
approx_front- Approximation set to evaluate.weight_vectors- Reference weight vectors (each summing to ~1).reference_point- Ideal point z* (minimization target; typically the component-wise minimum of the true Pareto front).utility- Scalarizing function variant.
§Returns
R2 value. Lower is better. Returns f64::INFINITY for empty inputs.
§Examples
use scirs2_optimize::multiobjective::indicators::{r2_indicator, R2Utility};
let front = vec![vec![0.0,1.0], vec![0.5,0.5], vec![1.0,0.0]];
let weights = vec![vec![1.0,0.0], vec![0.5,0.5], vec![0.0,1.0]];
let z_star = vec![0.0, 0.0];
let r2 = r2_indicator(&front, &weights, &z_star, R2Utility::Tchebycheff);
assert!(r2 >= 0.0);