axtreme.distributions.mixture¶
Mixture model variants.
Functions
|
Returns bounds in which the value for quantile q is gaurenteed to be found. |
Classes
|
Mixture distributions where extreme caclulations are approximated. |
- axtreme.distributions.mixture.icdf_value_bounds(dist: MixtureSameFamily, q: Tensor) Tensor ¶
Returns bounds in which the value for quantile q is gaurenteed to be found.
- Parameters:
dist –
(*batch_shape,)
mixture distribution producing events of event_shape samples.q – quantile to find the inverse cdf of. Must be boardcastable up to (
*batch_shape
,). Must not have more dimensions than*batch_shape
(only 1 q can be passed to each of the distributions in the batch.)
- Returns:
tensor of shape (2,*batch_shape), there the first index represents the lower bounds, and the second the upper bounds.
Details: Mixture distribution calculate the CDF as follows:
\(q = w_i * CDF_1(y) + w_2 * CDF_2(y) + ... + w_n * CDF_n(y)\) Which can be written as: \(q = w_i * q_1 + w_2 * q_2 + ... + w_n * q_n\)
where \(0 <= w_i <= 1\) and \(\\sum{w_i} = 1\)
An effective way to bound the x values the can produce y is:
take the
icdf(q)
for each distribution. Now have X_n values.lower_bound = min(X_n)
: at this point the first component distribution has become big enough to produce q. As the weights are between [0,1] no point prior would be able to procude q as no q_i was large enough.supper_bound = max(X_n)
: at this point the last component distribution has become big enough to produce q. As the weights sum to one, q must be produced by this point.