pub struct EncodeObjective<'a> {
pub metric_factor: Option<ArrayView2<'a, f64>>,
pub prior_alpha: Option<&'a [f64]>,
pub metric_norm_bound: f64,
}Expand description
The TRUE per-row encode objective’s non-Euclidean ingredients (F3), so the
Kantorovich certificate certifies the SAME functional the fit optimized t
against — not a bare Euclidean stand-in.
The fit’s per-row data loss is generalized least squares ½ rᵀ M_n r
(r = m(t) − x) under a per-row output metric M_n = U_n U_nᵀ
(gam_problem::RowMetric), plus a per-axis latent coordinate prior
Σ_a ArdAxisPrior(α_a, t_a) (the ARD Gaussian / von-Mises energy the fit
placed on the coordinate). The metric-free encode drops BOTH, so its certified
root solves a different problem whenever a non-identity metric or an active
prior is present. EncodeObjective threads them back in:
metric_factor— the per-row factorU_n ∈ ℝ^{p×rank};None⇒M = I. Whitening reduces toM r = U(Uᵀr)andJᵀ M J = (UᵀJ)ᵀ(UᵀJ).prior_alpha— per-axis ARD precisionα_a(the caller folds in any row weight);None/0⇒ no prior on that axis. The period is read from the atom’s basis kind so a periodic axis uses the von-Mises energy.metric_norm_bound— a GLOBAL upper boundmax_n ‖M_n‖used to scale the offline chart Lipschitz (the per-rowM_nentersβ, ηonline; the certificate needs a validLupper bound, andL_datascales by‖M‖).
EncodeObjective::euclidean (all None, bound 1) reproduces the metric-
free field bit-for-bit, so every existing caller is unchanged.
Fields§
§metric_factor: Option<ArrayView2<'a, f64>>Per-row output-metric factor U ∈ ℝ^{p×rank} (M = U Uᵀ). None ⇒ I.
prior_alpha: Option<&'a [f64]>Per-axis ARD precision α_a (row weight folded in). None ⇒ no prior.
metric_norm_bound: f64Global bound max_n ‖M_n‖ scaling the offline chart Lipschitz. 1.0 for
the Euclidean objective.
Implementations§
Source§impl<'a> EncodeObjective<'a>
impl<'a> EncodeObjective<'a>
Trait Implementations§
Source§impl<'a> Clone for EncodeObjective<'a>
impl<'a> Clone for EncodeObjective<'a>
Source§fn clone(&self) -> EncodeObjective<'a>
fn clone(&self) -> EncodeObjective<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for EncodeObjective<'a>
Auto Trait Implementations§
impl<'a> Freeze for EncodeObjective<'a>
impl<'a> RefUnwindSafe for EncodeObjective<'a>
impl<'a> Send for EncodeObjective<'a>
impl<'a> Sync for EncodeObjective<'a>
impl<'a> Unpin for EncodeObjective<'a>
impl<'a> UnsafeUnpin for EncodeObjective<'a>
impl<'a> UnwindSafe for EncodeObjective<'a>
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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.