pub enum ResponseDegeneracyKind {
BinomialAllZeros,
BinomialAllOnes,
PoissonAllZeros,
NegativeBinomialAllZeros,
GaussianNearConstant {
sample_sd: f64,
min_sd: f64,
},
}Expand description
Round tolerance for recognising an integer-valued (count) response.
infer_from_response classifies a numeric response as a Poisson count when
every value is finite, non-negative, and within this window of its nearest
non-negative integer. The threshold is looser than BINOMIAL_BINARY_TOL
because count columns frequently arrive as f64 round-trips of integers
(CSV parse, integer→double promotion) that accumulate ULP-scale error well
above 1e-12; 1e-9 admits those without ever matching genuinely
continuous data, whose fractional parts are O(1).
Classifier for a ResponseDegeneracy. Each variant carries the family-
specific evidence the caller needs to format a useful message without
having to re-derive the diagnostic.
Variants§
BinomialAllZeros
Bernoulli / Binomial response with every observed value equal to 0.
BinomialAllOnes
Bernoulli / Binomial response with every observed value equal to 1.
PoissonAllZeros
Poisson response with no positive counts. The log-rate likelihood has its supremum at η = −∞, not at a finite fitted mode.
NegativeBinomialAllZeros
Negative-Binomial response with no positive counts. As for Poisson, the log-rate likelihood has no finite optimum or finite posterior moments.
GaussianNearConstant
Gaussian response that is effectively constant in f64 arithmetic
(sample standard deviation at or below GAUSSIAN_MIN_SAMPLE_SD). The
marginal REML log-likelihood −n/2·log σ² diverges to +∞ as the
fitted scale σ → 0, so every outer evaluation rejects with a
non-finite score. Carries the observed sample_sd and the min_sd
threshold so the message can quote both verbatim (#332).
Fields
min_sd: f64The rejection threshold (GAUSSIAN_MIN_SAMPLE_SD).
Trait Implementations§
Source§impl Clone for ResponseDegeneracyKind
impl Clone for ResponseDegeneracyKind
Source§fn clone(&self) -> ResponseDegeneracyKind
fn clone(&self) -> ResponseDegeneracyKind
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 ResponseDegeneracyKind
impl RefUnwindSafe for ResponseDegeneracyKind
impl Send for ResponseDegeneracyKind
impl Sync for ResponseDegeneracyKind
impl Unpin for ResponseDegeneracyKind
impl UnsafeUnpin for ResponseDegeneracyKind
impl UnwindSafe for ResponseDegeneracyKind
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> 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.