pub struct AmplifiedDecayAwareSalienceObjective {
pub alpha: f64,
}Expand description
Scores a NoteCandidate by salience with exponential decay and a non-linear
amplification exponent applied after decay.
Formula: (salience * exp(-decay_factor * age_days)) ^ alpha
With alpha > 1.0, high-salience memories rank more clearly above low-salience
ones when relevance is similar. At alpha = 1.5 (the memory-recall default),
salience 0.9 → 0.854 and salience 0.3 → 0.164 — a ~5.2× spread vs the ~3× linear
spread. Keep alpha ≤ 2.0; values above 2 compress near-zero salience toward 0.
Used by the memory recall pipeline (ADR-033 §4) to make salience a meaningful tiebreaker without dominating relevance at the default weight of 0.20.
Fields§
§alpha: f64Power applied to the decayed salience value. Must be > 0.
Implementations§
Source§impl AmplifiedDecayAwareSalienceObjective
impl AmplifiedDecayAwareSalienceObjective
Sourcepub fn default_memory() -> Self
pub fn default_memory() -> Self
Default memory alpha from the memory recall handler: 1.5.
Trait Implementations§
Source§impl Objective<NoteCandidate> for AmplifiedDecayAwareSalienceObjective
impl Objective<NoteCandidate> for AmplifiedDecayAwareSalienceObjective
Source§fn score(&self, candidate: &NoteCandidate, _context: &ObjectiveContext) -> f64
fn score(&self, candidate: &NoteCandidate, _context: &ObjectiveContext) -> f64
Source§fn precision(&self, _candidate: &T, _context: &ObjectiveContext) -> f64
fn precision(&self, _candidate: &T, _context: &ObjectiveContext) -> f64
Source§fn passes_score(&self, score: f64, context: &ObjectiveContext) -> bool
fn passes_score(&self, score: f64, context: &ObjectiveContext) -> bool
Source§fn passes(&self, candidate: &T, context: &ObjectiveContext) -> bool
fn passes(&self, candidate: &T, context: &ObjectiveContext) -> bool
Source§fn batch_score(
&self,
candidates: &[T],
context: &ObjectiveContext,
) -> Vec<(usize, f64)>
fn batch_score( &self, candidates: &[T], context: &ObjectiveContext, ) -> Vec<(usize, f64)>
(index, score) pairs. Read more