pub struct PairSurfaceFit {
pub phi_a: Array2<f64>,
pub phi_b: Array2<f64>,
pub surface: TensorSurfaceFit,
pub backend: PairSurfaceBackend,
pub lower_corner: [f64; 2],
pub cell_widths: [f64; 2],
}Expand description
A pair-component fit from RAW coordinates: the factor bases it was fit
on (the grid engine’s per-axis uniform cubic B-splines, evaluated on the
sample — exactly what CarveInput consumes, one measure end to end)
plus the TensorSurfaceFit carve product and which backend produced it.
Fields§
§phi_a: Array2<f64>Axis-1 basis on the sample (n × (K+3), partition of unity).
phi_b: Array2<f64>Axis-2 basis on the sample (n × (K+3), partition of unity).
surface: TensorSurfaceFitThe carve product: coefficients, covariances, λ, EDF.
backend: PairSurfaceBackend§lower_corner: [f64; 2]Lower corner of the per-axis uniform knot range (the data’s
bounding box) — with Self::cell_widths, everything needed to
rebuild a basis row at an arbitrary point.
cell_widths: [f64; 2]Knot-cell width per axis.
Implementations§
Source§impl PairSurfaceFit
impl PairSurfaceFit
Sourcepub fn predict(
&self,
dim: usize,
x1: f64,
x2: f64,
) -> Result<(f64, f64), String>
pub fn predict( &self, dim: usize, x1: f64, x2: f64, ) -> Result<(f64, f64), String>
Posterior (mean, variance) of response dimension dim at an
arbitrary point, through the carve-facing posterior objects — valid
for BOTH backends, since both populate the same surface contract:
mean = b₁ᵀ C_d b₂ and variance = σ̂²_d · xᵀUx with U the shared
scale-free coefficient covariance, σ̂²_d the residual variance at
n − edf, and x the 16-entry tensor basis row. Outside the data
bounding box the boundary cell’s cubic polynomial extends (the grid
engine’s convention).
Trait Implementations§
Source§impl Clone for PairSurfaceFit
impl Clone for PairSurfaceFit
Source§fn clone(&self) -> PairSurfaceFit
fn clone(&self) -> PairSurfaceFit
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 PairSurfaceFit
impl RefUnwindSafe for PairSurfaceFit
impl Send for PairSurfaceFit
impl Sync for PairSurfaceFit
impl Unpin for PairSurfaceFit
impl UnsafeUnpin for PairSurfaceFit
impl UnwindSafe for PairSurfaceFit
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.