pub struct DecayAwareSalienceObjective {
pub decay_rate: f64,
}Expand description
Scores a NoteCandidate by salience with configurable temporal decay.
The decay formula is determined by the configured DecayModel (injected at
construction time). The default DecayModel::Exponential uses the note’s own
decay_factor: salience * exp(-decay_factor * age_days).
This objective participates in WeightedObjective composition alongside
RrfFusionObjective and TemporalRecencyObjective to form the full recall
scoring pipeline.
Fields§
§decay_rate: f64Exponential decay rate k (>= 0.0). Score = salience * exp(-k * age_days).
Corresponds to the per-note decay_factor parameter stored on memory notes.
Implementations§
Source§impl DecayAwareSalienceObjective
impl DecayAwareSalienceObjective
Sourcepub fn new(decay_rate: f64) -> Self
pub fn new(decay_rate: f64) -> Self
Create a new objective with the given exponential decay rate.
decay_rate = 0.01 gives a ~69-day half-life (default for memory notes).
Sourcepub fn default_memory() -> Self
pub fn default_memory() -> Self
Default memory decay rate: 0.01 (~69-day half-life).
Trait Implementations§
Source§impl Objective<NoteCandidate> for DecayAwareSalienceObjective
impl Objective<NoteCandidate> for DecayAwareSalienceObjective
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.