Companion for _Distribution: the validating factory.
Attributes
- Companion
- class
- Graph
-
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
_Distribution.type
Members list
Type members
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Builds a distribution, or None when the parameters are outside the family's domain.
Builds a distribution, or None when the parameters are outside the family's domain.
Validation lives here rather than at the call sites so an invalid distribution simply cannot be constructed — normal(0, -1) leaves its node symbolic instead of producing an object whose every kernel would return NaN. The same "domain errors stay symbolic" rule the rest of the library follows.
Value parameters
- kind
-
the family
- params
-
the parameter vector, whose length must match the family's arity
Attributes
- Returns
-
the distribution, or
Noneif the parameters are invalid
Concrete fields
The largest support a hypergeometric distribution may have (F_0132).
The largest support a hypergeometric distribution may have (F_0132).
Its cdf has no closed form, so the masses are tabulated once per distribution (log-space ratios, normalised) and every query reads the table: quantile and draw call the cdf dozens of times per answer, so recomputing a sum each time would multiply the cost by that. A table of a million doubles is 8 MB and is built by a million ratios: measured at the cap (D_0152, hypergeometric(4000000, 2000000, 999999), the first query building the table), 0.10 s on the JVM and 0.15 s on Node. Fixed, not a core.Limit: the factory and the kernels take no environment, the integrator-parameter precedent recorded in the F_0124 inventory.