pub struct TermBuildContext {
pub identity: TermIdentityKey,
pub rho_slots: Vec<usize>,
pub reduced_width: usize,
pub gauge_t_block: Option<Array2<f64>>,
}Expand description
Per-term context for the new (about-to-run) fit. Carries everything the
transfer needs to lay ρ out in the new fit’s coordinate system, plus the
per-block gauge lift T_b : reduced → raw used to project the parent’s
RAW β into this fold’s reduced coordinates, without reaching back into the
solver internals.
Fields§
§identity: TermIdentityKeyStructural identity of this new-fit term.
rho_slots: Vec<usize>Indices into the new fit’s outer ρ vector that this term’s penalties occupy (after label de-duplication). Empty for an unpenalized term.
reduced_width: usizeReduced (post-identifiability) width of this term’s block in the NEW
fit — i.e. spec.design.ncols(). The cold β for this block is a zero
vector of this length.
gauge_t_block: Option<Array2<f64>>This block’s slice of the NEW fit’s gauge lift T : reduced → raw
(shape raw_width × reduced_width, β_raw = T · θ). When present and
its raw row count matches the parent term’s raw_beta length, the
parent’s RAW β is least-squares projected onto this fold’s reduced
subspace via θ = (TᵀT + εI)⁻¹ Tᵀ β_raw_parent. None (or a raw-width
mismatch) ⇒ β stays cold for this block.
Trait Implementations§
Source§impl Clone for TermBuildContext
impl Clone for TermBuildContext
Source§fn clone(&self) -> TermBuildContext
fn clone(&self) -> TermBuildContext
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 TermBuildContext
impl RefUnwindSafe for TermBuildContext
impl Send for TermBuildContext
impl Sync for TermBuildContext
impl Unpin for TermBuildContext
impl UnsafeUnpin for TermBuildContext
impl UnwindSafe for TermBuildContext
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.