#[non_exhaustive]pub struct SmoothPositiveResult {
pub fitted: FdMatrix,
pub log_coefficients: FdMatrix,
pub edf: f64,
pub gcv: f64,
}Expand description
Result of log-domain positive smoothing.
The fitted values are guaranteed strictly positive (> 0) for any strictly-positive input, because they are obtained by exponentiating the log-domain B-spline smooth.
§Bias caveat
This is a log-transform smoother: it minimises squared error in log space
(‖log(y) − Φc‖²), not in the original scale. The back-transformed values
exp(Φ̂c) are therefore not the minimum-MSE estimate of E[y | t] — they
tend to underestimate the conditional mean by a Jensen’s-inequality correction.
For an approximately unbiased estimate in the original scale apply
exp(fitted + σ² / 2) where σ² is the conditional variance of the log-transformed
fit (e.g. from the GCV score). The correction is intentionally left to the caller
in v1.
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.fitted: FdMatrixFitted values in the original (positive) scale (n × m, all entries > 0).
log_coefficients: FdMatrixB-spline coefficients from the log-domain smooth (n × K).
edf: f64Effective degrees of freedom of the log-domain fit.
gcv: f64GCV score of the log-domain fit.
Trait Implementations§
Source§impl Clone for SmoothPositiveResult
impl Clone for SmoothPositiveResult
Source§fn clone(&self) -> SmoothPositiveResult
fn clone(&self) -> SmoothPositiveResult
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 SmoothPositiveResult
impl Debug for SmoothPositiveResult
Source§impl PartialEq for SmoothPositiveResult
impl PartialEq for SmoothPositiveResult
impl StructuralPartialEq for SmoothPositiveResult
Auto Trait Implementations§
impl Freeze for SmoothPositiveResult
impl RefUnwindSafe for SmoothPositiveResult
impl Send for SmoothPositiveResult
impl Sync for SmoothPositiveResult
impl Unpin for SmoothPositiveResult
impl UnsafeUnpin for SmoothPositiveResult
impl UnwindSafe for SmoothPositiveResult
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> 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,
impl<T> Scalar 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.