torch.distributions.ExponentialFamily
class ExponentialFamily extends Distributionnew ExponentialFamily(batch_shape: readonly number[], event_shape: readonly number[], options: DistributionOptions = {})
Abstract base class for distributions in the exponential family.
Exponential family distributions have the form: p(x|θ) = h(x) * exp(η(θ)·T(x) - A(θ))
Where:
- h(x) is the base measure
- η(θ) are the natural parameters
- T(x) are the sufficient statistics
- A(θ) is the log normalizer
Examples
// Normal distribution is an exponential family distribution
const normal = new torch.distributions.Normal(0, 1);
// Access natural parameters (for Normal: [μ/σ², -1/(2σ²)])
const eta = normal._natural_params;