#[non_exhaustive]pub struct FosrResult2d {
pub intercept: Vec<f64>,
pub beta: FdMatrix,
pub fitted: FdMatrix,
pub residuals: FdMatrix,
pub r_squared_pointwise: Vec<f64>,
pub r_squared: f64,
pub beta_se: Option<FdMatrix>,
pub lambda_s: f64,
pub lambda_t: f64,
pub gcv: f64,
pub grid: Grid2d,
}Expand description
Result of 2D function-on-scalar regression.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.intercept: Vec<f64>Intercept surface beta_0(s,t), flattened column-major (length m1*m2).
beta: FdMatrixCoefficient surfaces beta_j(s,t), p x (m1*m2) matrix (row j = flattened beta_j).
fitted: FdMatrixFitted surface values, n x (m1*m2) matrix.
residuals: FdMatrixResidual surfaces, n x (m1*m2) matrix.
r_squared_pointwise: Vec<f64>Pointwise R^2(s,t), flattened (length m1*m2).
r_squared: f64Global R^2 (average of pointwise).
beta_se: Option<FdMatrix>Standard error surfaces for each beta_j (p x (m1*m2)), or None if the system is underdetermined.
lambda_s: f64Smoothing parameter in the s-direction.
lambda_t: f64Smoothing parameter in the t-direction.
gcv: f64Generalised cross-validation score.
grid: Grid2dGrid specification.
Implementations§
Source§impl FosrResult2d
impl FosrResult2d
Sourcepub fn beta_surface(&self, j: usize) -> FdMatrix
pub fn beta_surface(&self, j: usize) -> FdMatrix
Reshape the j-th coefficient surface into an m1 x m2 matrix.
§Panics
Panics if j >= p (number of predictors).
Sourcepub fn r_squared_surface(&self) -> FdMatrix
pub fn r_squared_surface(&self) -> FdMatrix
Reshape pointwise R^2(s,t) into an m1 x m2 matrix.
Sourcepub fn residual_surface(&self, i: usize) -> FdMatrix
pub fn residual_surface(&self, i: usize) -> FdMatrix
Reshape the residual for observation i into an m1 x m2 matrix.
§Panics
Panics if i >= n (number of observations).
Trait Implementations§
Source§impl Clone for FosrResult2d
impl Clone for FosrResult2d
Source§fn clone(&self) -> FosrResult2d
fn clone(&self) -> FosrResult2d
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FosrResult2d
impl Debug for FosrResult2d
Source§impl PartialEq for FosrResult2d
impl PartialEq for FosrResult2d
impl StructuralPartialEq for FosrResult2d
Auto Trait Implementations§
impl Freeze for FosrResult2d
impl RefUnwindSafe for FosrResult2d
impl Send for FosrResult2d
impl Sync for FosrResult2d
impl Unpin for FosrResult2d
impl UnsafeUnpin for FosrResult2d
impl UnwindSafe for FosrResult2d
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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.