diff --git a/src/history.rs b/src/history.rs index b83efbd..752d4fc 100644 --- a/src/history.rs +++ b/src/history.rs @@ -29,7 +29,6 @@ pub struct HistoryBuilder< beta: f64, drift: D, p_draw: f64, - online: bool, score_sigma: f64, convergence: ConvergenceOptions, observer: O, @@ -60,7 +59,6 @@ impl, O: Observer, K: Eq + Hash + Clone> HistoryBuilder< sigma: self.sigma, beta: self.beta, p_draw: self.p_draw, - online: self.online, score_sigma: self.score_sigma, convergence: self.convergence, observer: self.observer, @@ -87,11 +85,6 @@ impl, O: Observer, K: Eq + Hash + Clone> HistoryBuilder< self } - pub fn online(mut self, online: bool) -> Self { - self.online = online; - self - } - /// Default observation noise for scored outcomes. /// /// # Panics @@ -135,7 +128,6 @@ impl, O: Observer, K: Eq + Hash + Clone> HistoryBuilder< beta: self.beta, drift: self.drift, p_draw: self.p_draw, - online: self.online, score_sigma: self.score_sigma, convergence: self.convergence, observer, @@ -155,7 +147,6 @@ impl, O: Observer, K: Eq + Hash + Clone> HistoryBuilder< beta: self.beta, drift: self.drift, p_draw: self.p_draw, - online: self.online, score_sigma: self.score_sigma, convergence: self.convergence, observer: self.observer, @@ -171,7 +162,6 @@ impl Default for HistoryBuilder beta: BETA, drift: ConstantDrift(GAMMA), p_draw: P_DRAW, - online: false, score_sigma: 1.0, convergence: ConvergenceOptions::default(), observer: NullObserver, @@ -196,7 +186,6 @@ pub struct History< beta: f64, drift: D, p_draw: f64, - online: bool, score_sigma: f64, convergence: ConvergenceOptions, observer: O, @@ -223,7 +212,6 @@ impl History { beta: BETA, drift: ConstantDrift(GAMMA), p_draw: P_DRAW, - online: false, score_sigma: 1.0, convergence: ConvergenceOptions::default(), observer: NullObserver, @@ -399,7 +387,7 @@ impl, O: Observer, K: Eq + Hash + Clone> History = self .time_slices .par_iter() - .map(|ts| ts.log_evidence(self.online, targets, forward, &self.agents)) + .map(|ts| ts.log_evidence(targets, forward, &self.agents)) .collect(); per_slice.into_iter().sum() } @@ -407,7 +395,7 @@ impl, O: Observer, K: Eq + Hash + Clone> History>( &self, - online: bool, forward: bool, skills: &SkillStore, agents: &CompetitorStore, @@ -67,9 +64,7 @@ impl Item { let r = &agents[self.agent].rating; let skill = skills.get(self.agent).unwrap(); - if online { - Rating::new(skill.online, r.beta, r.drift) - } else if forward { + if forward { Rating::new(skill.forward, r.beta, r.drift) } else { Rating::new(skill.posterior() / self.likelihood, r.beta, r.drift) @@ -107,7 +102,6 @@ impl Event { pub(crate) fn within_priors>( &self, - online: bool, forward: bool, skills: &SkillStore, agents: &CompetitorStore, @@ -117,7 +111,7 @@ impl Event { .map(|team| { team.items .iter() - .map(|item| item.within_prior(online, forward, skills, agents)) + .map(|item| item.within_prior(forward, skills, agents)) .collect::>() }) .collect::>() @@ -136,7 +130,7 @@ impl Event { convergence: crate::ConvergenceOptions, arena: &mut ScratchArena, ) -> EventUpdate { - let teams = self.within_priors(false, false, skills, agents); + let teams = self.within_priors(false, skills, agents); let result = self.outputs(); let g = match self.kind { EventKind::Ranked => { @@ -372,7 +366,7 @@ impl TimeSlice { if from > 0 || self.color_groups.is_empty() { // Initial pass (add_events) or no color groups yet: simple sequential sweep. for event in self.events.iter_mut().skip(from) { - let teams = event.within_priors(false, false, &self.skills, agents); + let teams = event.within_priors(false, &self.skills, agents); let result = event.outputs(); let g = match event.kind { @@ -582,7 +576,6 @@ impl TimeSlice { pub(crate) fn log_evidence>( &self, - online: bool, targets: &[Index], forward: bool, agents: &CompetitorStore, @@ -594,7 +587,7 @@ impl TimeSlice { let mut arena = ScratchArena::new(); let run_event = |event: &Event, arena: &mut ScratchArena| -> f64 { - let teams = event.within_priors(online, forward, &self.skills, agents); + let teams = event.within_priors(forward, &self.skills, agents); let result = event.outputs(); match event.kind { EventKind::Ranked => { @@ -623,7 +616,7 @@ impl TimeSlice { }; if targets.is_empty() { - if online || forward { + if forward { self.events .iter() .map(|event| run_event(event, &mut arena)) @@ -631,7 +624,7 @@ impl TimeSlice { } else { self.events.iter().map(|event| event.log_evidence).sum() } - } else if online || forward { + } else if forward { self.events .iter() .filter(|event| {