pub struct TensorSurfaceFit {
pub coeffs: Vec<Array2<f64>>,
pub coeff_covariance: Vec<Array2<f64>>,
pub residual_cross_cov: Array2<f64>,
pub unit_covariance: Array2<f64>,
pub lambda: f64,
pub edf: f64,
pub residual_df: f64,
}Expand description
A penalized tensor-surface fit over the code sample: the producer of
CarveInputs for BOTH binding notions (#993 items 1–2).
coeffs[d] is the fitted M₁ × M₂ coefficient matrix for response
dimension d; coeff_covariance[d] is the matching SCALE-INCLUDED
posterior covariance of its row-major vec (the mgcv-Vb object
wood_smooth_test contracts for); joint_covariance() assembles
the cross-dimension covariance for the joint binding test. The fit is
evaluated against the SAME empirical code measure the carve centers
against — the test and its covariance live on one measure by
construction, which is the coherence the production fit’s own Hessian
(a different parameterization: tangent frames, not tensor
coefficients) cannot offer the carve.
Fields§
§coeffs: Vec<Array2<f64>>Per response dimension, M₁ × M₂.
coeff_covariance: Vec<Array2<f64>>Per response dimension, scale-included Vb of the row-major vec.
residual_cross_cov: Array2<f64>Scale-included residual cross-covariance between response
dimensions (D × D, entries r_dᵀ r_e / (n − edf)). Diagonal
entries are the per-dimension scales the Vbs carry.
unit_covariance: Array2<f64>Scale-FREE coefficient covariance shared by all dimensions
(V (Λ+λI)⁻¹ Vᵀ, M₁M₂ × M₁M₂); coeff_covariance[d] is this
times residual_cross_cov[d,d].
lambda: f64REML-selected ridge strength.
edf: f64Effective degrees of freedom Σ dᵢ/(dᵢ+λ) (per dimension; the
design and λ are shared).
residual_df: f64Residual degrees of freedom n − edf (the denominator d.f. for
the Estimated-scale F branch).
Implementations§
Source§impl TensorSurfaceFit
impl TensorSurfaceFit
Sourcepub fn joint_covariance(&self) -> Array2<f64>
pub fn joint_covariance(&self) -> Array2<f64>
Joint covariance of the dimension-major stacked coefficient vector
[vec(C₀); vec(C₁); …]: with a shared design and shared λ the
posterior is the Kronecker product
residual_cross_cov ⊗ unit_covariance — index (d·M + i, e·M + j) = S[d,e]·U[i,j]. Feed to CarveInput::joint_coeff_covariance.
Trait Implementations§
Source§impl Clone for TensorSurfaceFit
impl Clone for TensorSurfaceFit
Source§fn clone(&self) -> TensorSurfaceFit
fn clone(&self) -> TensorSurfaceFit
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 TensorSurfaceFit
impl RefUnwindSafe for TensorSurfaceFit
impl Send for TensorSurfaceFit
impl Sync for TensorSurfaceFit
impl Unpin for TensorSurfaceFit
impl UnsafeUnpin for TensorSurfaceFit
impl UnwindSafe for TensorSurfaceFit
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.