pub struct KroneckerInvariantStructure {
pub marginal_eigenvalues: Arc<Vec<Array1<f64>>>,
pub marginal_qs: Arc<Vec<Array2<f64>>>,
pub reparameterized_marginals: Arc<Vec<Array2<f64>>>,
pub max_balanced_eigenvalue: f64,
}Expand description
λ-invariant Kronecker tensor structure: everything in a tensor-product fit that depends ONLY on the marginal designs/penalties (which are fixed for the whole fit) and NOT on the smoothing parameters λ = exp(ρ).
The marginal eigendecomposition (O(Σ q_k³)), the reparameterized marginals
B_k · U_k, and the balanced-penalty shrinkage scale max_bal are all
functions of the fixed marginal data alone. Caching them once per fit lets
every outer REML iterate (50+ per fit on the #1082 tensor cases) skip the
repeated eigh() calls and B_k U_k GEMMs; only the cheap
kronecker_logdet_and_derivatives λ-grid sweep is redone per iterate.
Fields§
§marginal_eigenvalues: Arc<Vec<Array1<f64>>>Marginal eigenvalues from each marginal penalty eigendecomposition.
Arc-shared so handing this structure to the per-iterate memoized
engine is an O(1) refcount bump, not a deep array copy.
marginal_qs: Arc<Vec<Array2<f64>>>Marginal eigenvector matrices U_k.
reparameterized_marginals: Arc<Vec<Array2<f64>>>Reparameterized marginal designs: B_k · U_k for each marginal k.
max_balanced_eigenvalue: f64Max balanced-penalty eigenvalue scale max_k-grid Σ_k μ_{k,j_k}/||S_k||_F,
used to form the shrinkage ridge floor * max_bal. λ-independent.
Implementations§
Trait Implementations§
Source§impl Clone for KroneckerInvariantStructure
impl Clone for KroneckerInvariantStructure
Source§fn clone(&self) -> KroneckerInvariantStructure
fn clone(&self) -> KroneckerInvariantStructure
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 KroneckerInvariantStructure
impl RefUnwindSafe for KroneckerInvariantStructure
impl Send for KroneckerInvariantStructure
impl Sync for KroneckerInvariantStructure
impl Unpin for KroneckerInvariantStructure
impl UnsafeUnpin for KroneckerInvariantStructure
impl UnwindSafe for KroneckerInvariantStructure
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.