pub struct RemlCandidate {
pub index: usize,
pub name: String,
pub score: f64,
pub edf: Option<f64>,
pub log_lik: Option<f64>,
pub family: Option<String>,
}Expand description
One fitted model in a REML/LAML evidence comparison.
Fields§
§index: usize§name: String§score: f64Minimised REML/LAML cost. Lower is better. This is the model’s reported
evidence headline (Model.evidence), kept verbatim in the score table.
edf: Option<f64>§log_lik: Option<f64>Log-likelihood at the converged mode, on the engine’s
constants-omitted scale (same as gam_inference::model_comparison).
Present when the fit carries it; None for legacy payloads.
family: Option<String>Response-family tag (e.g. “gaussian”, “gamma”, “binomial”). Carried so
compare_reml_fits can REFUSE to rank fits whose REML/LAML scores are on
incomparable base measures (a cross-family comparison is meaningless;
#1384). None for legacy payloads that did not record it — those are not
guarded (back-compatible), but every current FFI candidate carries it.
Implementations§
Source§impl RemlCandidate
impl RemlCandidate
Sourcepub fn ranking_score(&self) -> f64
pub fn ranking_score(&self) -> f64
Cost used to RANK candidates and pick the winner.
The REML/LAML marginal-likelihood evidence headline (score) does NOT
reliably Occam-penalise an added pure-noise smooth: on y ~ s(x) vs
y ~ s(x) + s(z) with z ⟂ y, the augmented model’s evidence is
lower (apparently better) by a few nats on essentially every dataset,
because the Gaussian REML Occam pair ½(log|H| − log|S|₊) collapses
toward zero for a finite-λ̂ null term while that term still spends a
few effective degrees of freedom fitting noise (issue #1362).
The conditional AIC −2ℓ + 2·edf prices exactly those spent degrees of
freedom and discriminates correctly: it penalises the noise smooth
(Δ ≈ +15 nats) yet rewards a genuinely relevant smooth (Δ ≈ −650),
preserving power. We therefore rank on the conditional AIC whenever both
the log-likelihood and the effective degrees of freedom are available,
and fall back to the raw evidence headline otherwise. The reported
score_table still carries the unaltered evidence (reml_score), so
Model.evidence / bayes_factor_vs stay consistent with the table.
Trait Implementations§
Source§impl Clone for RemlCandidate
impl Clone for RemlCandidate
Source§fn clone(&self) -> RemlCandidate
fn clone(&self) -> RemlCandidate
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 RemlCandidate
impl RefUnwindSafe for RemlCandidate
impl Send for RemlCandidate
impl Sync for RemlCandidate
impl Unpin for RemlCandidate
impl UnsafeUnpin for RemlCandidate
impl UnwindSafe for RemlCandidate
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.