pub enum WeightField {
Identity,
Factored {
u: Arc<Array2<f64>>,
rank: usize,
p_out: usize,
},
}Expand description
Per-observation behavioral-metric field W_n ∈ ℝ^{p × p}, stored in
low-rank factored form W_n = U_n U_n^T with U_n ∈ ℝ^{p × r_n}.
The canonical coordinate is the one where one unit of motion in t is one
unit of behavioral change in the output space, so the W_n weighting is
load-bearing: the pullback metric is g_n = J_n^T W_n J_n. Storing as
U_n lets every contraction in this module run in
(J^T U_n)(U_n^T J) order, which is O(p · r · d + r · d²) per row — we
never materialize the p × p W_n, which is essential when p
(number of observation channels) is large but rank is small (e.g. one or
two behavioral dimensions per latent observation).
Identity is the gauge-fix default and corresponds to U_n = I_p so the
pullback reduces to the standard J_n^T J_n. Factored stores the
per-row U_n blocks contiguously: every row’s factor is p × rank, and
rows may share the same rank (uniform-rank case) or vary if the field is
data-driven. For the uniform-rank case the storage is
(n_obs, p * rank) row-major.
Variants§
Identity
W_n = I_p for every n. Reduces to the bare pullback J^T J.
Factored
Per-row low-rank factor U_n ∈ ℝ^{p × rank}. Storage layout: a
(n_obs, p * rank) row-major matrix where row n packs U_n in
column-major-within-row order U_n[i, k] = u[n, i * rank + k].
Implementations§
Source§impl WeightField
impl WeightField
Trait Implementations§
Source§impl Clone for WeightField
impl Clone for WeightField
Source§fn clone(&self) -> WeightField
fn clone(&self) -> WeightField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for WeightField
impl RefUnwindSafe for WeightField
impl Send for WeightField
impl Sync for WeightField
impl Unpin for WeightField
impl UnsafeUnpin for WeightField
impl UnwindSafe for WeightField
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
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.