Skip to main content

autoeq_optim/optim/
types.rs

1use super::objective_data::ObjectiveData;
2
3/// Data for multi-objective optimization across multiple measurements
4#[derive(Debug, Clone)]
5pub struct MultiObjectiveData {
6    /// One ObjectiveData per measurement curve. For
7    /// `MultiMeasurementStrategy::MinimaxUncertainty`, this holds B
8    /// bootstrap-resampled objectives generated once at setup time.
9    pub objectives: Vec<ObjectiveData>,
10    /// Strategy for combining per-measurement losses
11    pub strategy: crate::roomeq::MultiMeasurementStrategy,
12    /// Normalized weights (len == objectives.len()), used by WeightedSum
13    pub weights: Vec<f64>,
14    /// Lambda for VariancePenalized strategy
15    pub variance_lambda: f64,
16    /// CVaR tail fraction in (0, 1], used by `MinimaxUncertainty` when its
17    /// scalarisation is `Cvar`. `None` means pure worst-case (max).
18    pub uncertainty_cvar_alpha: Option<f64>,
19}
20
21/// Progress callback: (iteration, best_loss, epa_preference) -> continue/stop
22///
23/// Used to thread per-iteration optimizer progress through the room EQ call chain.
24/// `epa_preference` is `Some` when EPA is computed (every N iterations), `None` otherwise.
25pub type OptimProgressCallback =
26    Box<dyn FnMut(usize, f64, Option<f64>) -> crate::de::CallbackAction + Send>;