pub enum VmpFactor {
GaussianObservation {
target: String,
observation: f64,
precision: f64,
},
GaussianStep {
lhs: String,
rhs: String,
precision: f64,
},
DirichletCategorical {
dirichlet: String,
categorical: String,
},
CategoricalObservation {
dirichlet: String,
observation: usize,
num_categories: usize,
},
}Expand description
Conjugate relationship represented by a single factor.
Variants§
GaussianObservation
Gaussian observation with known precision, centred on another Gaussian
variable. Produces a natural-parameter delta of
η_delta = [τ_obs · y] with posterior precision contribution τ_obs.
Fields
GaussianStep
Gaussian x_child ~ N(x_parent, 1/τ) — a “Gaussian step” between two
unknown means sharing a known precision. Both endpoints receive a
symmetric natural-parameter delta driven by the other’s expected mean.
Fields
DirichletCategorical
x ~ Categorical(π) where π is itself a Dirichlet variable. Updates the
Dirichlet concentration by E_q[u(x)] = softmax(η_x) and contributes
E_q[log π] back to the Categorical natural parameters.
Fields
CategoricalObservation
Observed categorical value (evidence). Only contributes counts to its Dirichlet parent; the categorical itself is pinned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VmpFactor
impl RefUnwindSafe for VmpFactor
impl Send for VmpFactor
impl Sync for VmpFactor
impl Unpin for VmpFactor
impl UnsafeUnpin for VmpFactor
impl UnwindSafe for VmpFactor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.