pub struct GridSpline2dState {
pub coeffs: Vec<Vec<f64>>,
pub log_lambda: f64,
pub sigma2: Vec<f64>,
pub restricted_loglik: f64,
pub chol: Vec<f64>,
pub axis_lo: [f64; 2],
pub axis_h: [f64; 2],
pub axis_cells: [u64; 2],
pub m_axis: u64,
}Expand description
Serializable snapshot of a GridSpline2dFit (#1031 persistence
prerequisite). The grid is deliberately NOT a formula fast path — it is an
ANOVA pair component (#975 carve) — so there is no FitResult variant; this
state is what the carve’s persistence payload serializes and what
from_state replays for an exact predict.
Predict needs the MEAN (coeffs + the 16-entry tensor basis row, which is a
pure function of axes/m_axis) and the VARIANCE
(σ²·x'(X'WX+λS)⁻¹x through the retained Cholesky factor chol). All of
that — and nothing about the training rows — lives on the fit already, so the
state is a verbatim snapshot: no design CSR, no re-factor on load.
Fields§
§coeffs: Vec<Vec<f64>>Per response dimension: row-major coefficients g = j1·(K+3) + j2.
log_lambda: f64§sigma2: Vec<f64>Per response dimension: profiled (or supplied) observation variance σ².
restricted_loglik: f64§chol: Vec<f64>Lower Cholesky factor of X'WX + λS (unit-σ² scale), p × p row-major —
the factored posterior precision the variance term solves against.
axis_lo: [f64; 2]Per axis lower corner of the basis bounding box.
axis_h: [f64; 2]Per axis cell width h = (hi − lo)/K.
axis_cells: [u64; 2]Per axis cell count K.
m_axis: u64Basis count per axis, K + 3 (so p = m_axis²).
Trait Implementations§
Source§impl Clone for GridSpline2dState
impl Clone for GridSpline2dState
Source§fn clone(&self) -> GridSpline2dState
fn clone(&self) -> GridSpline2dState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GridSpline2dState
impl Debug for GridSpline2dState
Source§impl<'de> Deserialize<'de> for GridSpline2dState
impl<'de> Deserialize<'de> for GridSpline2dState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for GridSpline2dState
impl RefUnwindSafe for GridSpline2dState
impl Send for GridSpline2dState
impl Sync for GridSpline2dState
impl Unpin for GridSpline2dState
impl UnsafeUnpin for GridSpline2dState
impl UnwindSafe for GridSpline2dState
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.