pub struct BasisBuildResult {
pub design: DesignMatrix,
pub affine_offset: Option<Array1<f64>>,
pub active_penalties: Vec<ActivePenalty>,
pub dropped_penalties: Vec<DroppedPenaltyInfo>,
pub metadata: BasisMetadata,
pub kronecker_factored: Option<KroneckerFactoredBasis>,
pub joint_null_rotation: Option<JointNullRotation>,
}Expand description
Standardized basis build result for engine-level composition.
Fields§
§design: DesignMatrix§affine_offset: Option<Array1<f64>>Fixed row-wise contribution carried by an affine basis chart.
Ordinary bases are linear in their fitted coefficients and leave this
as None. An inhomogeneous boundary condition, such as a non-zero
B-spline endpoint anchor, realizes the basis as
offset(x) + design(x) * beta; the known offset(x) belongs here, not
in a fake coefficient column. Term-collection assembly sums these
channels and routes the result through the model’s ordinary likelihood
offset at fit and prediction time.
active_penalties: Vec<ActivePenalty>Canonical active penalties. Matrix, spectral metadata, operator form, and semantic identity are one record so dropping an earlier candidate cannot shift one channel without shifting all of them.
dropped_penalties: Vec<DroppedPenaltyInfo>Candidate diagnostics excluded from the active smoothing-parameter layout. Dropped candidates never share a positional container with active matrices.
metadata: BasisMetadata§kronecker_factored: Option<KroneckerFactoredBasis>Optional factored rowwise-Kronecker representation for tensor-product
bases. When present, downstream code can keep the design operator-backed
instead of forcing a fully materialized n x prod(q_j) block.
joint_null_rotation: Option<JointNullRotation>Joint-null absorption rotation for this basis, when the basis carries any penalties with a non-trivial joint null space.
Some(rotation) records Q = [U_range | U_null] where U_null spans
the joint null space null(Σ_k S_k) over this basis’s active
penalties (unscaled — the structural joint null is independent of
λ). After the basis pipeline applies this rotation, the design
becomes X · Q and each penalty becomes Qᵀ S_k Q, block-diagonal
with a guaranteed-zero null tail. The same Q must be replayed at
prediction time, so it is persisted in the fitted model. None
indicates either no penalties on this basis, or a full-rank joint
penalty (joint nullity = 0). A Some value is never recorded with
joint_nullity == 0 — the None discriminant is canonical for
“nothing to absorb”.
Stage-2 commit A: this field is plumbed into the struct but neither
computed nor applied yet. Stage-2 commit B populates it; Stage-2
commit D applies the rotation to design and penalties.
Trait Implementations§
Source§impl Clone for BasisBuildResult
impl Clone for BasisBuildResult
Source§fn clone(&self) -> BasisBuildResult
fn clone(&self) -> BasisBuildResult
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 BasisBuildResult
impl !RefUnwindSafe for BasisBuildResult
impl !UnwindSafe for BasisBuildResult
impl Send for BasisBuildResult
impl Sync for BasisBuildResult
impl Unpin for BasisBuildResult
impl UnsafeUnpin for BasisBuildResult
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.