pub struct SectionPosteriorState {
pub posteriors: HashMap<SectionType, BetaPosterior>,
pub priors: HashMap<SectionType, BetaPosterior>,
pub total_events: u64,
pub exploration_epoch: u64,
}Expand description
Per-profile section posterior state.
Fields§
§posteriors: HashMap<SectionType, BetaPosterior>§priors: HashMap<SectionType, BetaPosterior>§total_events: u64§exploration_epoch: u64Implementations§
Source§impl SectionPosteriorState
impl SectionPosteriorState
pub fn new() -> Self
pub fn from_priors(priors: HashMap<SectionType, BetaPosterior>) -> Self
pub fn default_priors() -> HashMap<SectionType, BetaPosterior>
pub fn to_snapshot(&self) -> SectionPosteriorSnapshot
pub fn from_snapshot(snapshot: SectionPosteriorSnapshot) -> Self
pub fn weights(&self, rng: &mut impl Rng) -> HashMap<SectionType, f64>
pub fn sample_weights(&self, rng: &mut impl Rng) -> HashMap<SectionType, f64>
pub fn deterministic_weights(&self) -> HashMap<SectionType, f64>
pub fn reset_posteriors(&mut self)
Sourcepub fn apply_signal(&mut self, signal: &BrainSignal)
pub fn apply_signal(&mut self, signal: &BrainSignal)
Apply a brain signal to update section posteriors in place.
Only Feedback events with section_signals affect section state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SectionPosteriorState
impl RefUnwindSafe for SectionPosteriorState
impl Send for SectionPosteriorState
impl Sync for SectionPosteriorState
impl Unpin for SectionPosteriorState
impl UnsafeUnpin for SectionPosteriorState
impl UnwindSafe for SectionPosteriorState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more