Skip to main content

BINOMIAL_BINARY_TOL

Constant BINOMIAL_BINARY_TOL 

Source
pub const BINOMIAL_BINARY_TOL: f64 = 1.0e-12; // 9.9999999999999998E-13f64
Expand description

Absolute tolerance for the exact-{0, 1} test that defines the scalar Bernoulli (Binomial) response support.

The scalar Binomial family carries no per-row trial count, so its log-likelihood is the Bernoulli/soft-label cross-entropy ℓ(η) = y·η − log(1 + eη), which is unbounded above for y ∉ {0, 1}. Both the auto-inference (infer_from_response) and degeneracy (validate_response_degeneracy) paths classify a value as binary by the same 1e-12 window; the support check shares this single threshold so the three layers agree on exactly which responses are admissible.