#[non_exhaustive]pub struct FunctionalGlmResult {Show 16 fields
pub intercept: f64,
pub beta_t: Vec<f64>,
pub beta_se: Vec<f64>,
pub gamma: Vec<f64>,
pub fitted_values: Vec<f64>,
pub linear_predictors: Vec<f64>,
pub ncomp: usize,
pub coefficients: Vec<f64>,
pub std_errors: Vec<f64>,
pub log_likelihood: f64,
pub deviance: f64,
pub iterations: usize,
pub fpca: FpcaResult,
pub aic: f64,
pub bic: f64,
pub family: GlmFamily,
}Expand description
Result of functional_glm for a scalar response over functional predictors.
Contains the fitted model parameters, diagnostic statistics, and the embedded
crate::regression::FpcaResult for projecting new data.
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: f64Intercept α
beta_t: Vec<f64>Functional coefficient β(t), evaluated on the original grid (length m)
beta_se: Vec<f64>Pointwise standard errors of β(t) (length m)
gamma: Vec<f64>Scalar coefficients γ (one per scalar covariate)
fitted_values: Vec<f64>Fitted mean values μ = g⁻¹(η) (length n)
linear_predictors: Vec<f64>Linear predictors η = Xβ (length n)
ncomp: usizeNumber of FPC components used
coefficients: Vec<f64>All regression coefficients [intercept, γ₁…γ_K, z₁…z_P]
std_errors: Vec<f64>Standard errors of all coefficients (intercept, FPC scores, scalar covariates)
log_likelihood: f64Log-likelihood at convergence (kernel; see module doc for AIC comparability note)
deviance: f64GLM deviance D = 2(LL_saturated − LL_fitted)
iterations: usizeNumber of IRLS iterations performed
fpca: FpcaResultFPCA result (embedded for projecting new data)
aic: f64Akaike Information Criterion: −2·log_likelihood + 2·p
bic: f64Bayesian Information Criterion: −2·log_likelihood + p·ln(n)
family: GlmFamilyExponential-family distribution used for this fit
Implementations§
Source§impl FunctionalGlmResult
impl FunctionalGlmResult
Sourcepub fn predict(
&self,
new_data: &FdMatrix,
new_scalar: Option<&FdMatrix>,
) -> Result<Vec<f64>, FdarError>
pub fn predict( &self, new_data: &FdMatrix, new_scalar: Option<&FdMatrix>, ) -> Result<Vec<f64>, FdarError>
Predict response for new functional data. Delegates to predict_functional_glm.
§Errors
Propagates FdarError::InvalidDimension from predict_functional_glm
when new_data / new_scalar shapes do not match the fitted model.
Trait Implementations§
Source§impl Clone for FunctionalGlmResult
impl Clone for FunctionalGlmResult
Source§fn clone(&self) -> FunctionalGlmResult
fn clone(&self) -> FunctionalGlmResult
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 FunctionalGlmResult
impl Debug for FunctionalGlmResult
Source§impl PartialEq for FunctionalGlmResult
impl PartialEq for FunctionalGlmResult
impl StructuralPartialEq for FunctionalGlmResult
Auto Trait Implementations§
impl Freeze for FunctionalGlmResult
impl RefUnwindSafe for FunctionalGlmResult
impl Send for FunctionalGlmResult
impl Sync for FunctionalGlmResult
impl Unpin for FunctionalGlmResult
impl UnsafeUnpin for FunctionalGlmResult
impl UnwindSafe for FunctionalGlmResult
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.