openquake.hme.utils.statsΒΆ
This module provides statistical functions that are not specific to any set of tests.
Functions
|
|
|
Calculates the geometric mean of either a sequence of numbers (returning a scalar) or the element-wise geometric mean of multiple sequences of numbers of equal length (i.e., the geometric mean of the i-th value across all sequences), returning an array of the same length as the input sequences. |
|
|
|
|
|
The Kullback-Leibler Divergence is a measure of the information loss in moving from a distribution P to a second distribution Q that may be a model or approximation. |
|
Returns the negative binomial probability for observing |
|
Returns the Poisson likelihood of observing num_events in a time_interval given the rate of those events in the units of the time interval (i.e., if the time_interval is in years, the rate is the annual occurrence rate). |
|
|
|
|
|
|
|
|
|
Returns the times of events |
|
Returns the times of events from an array of event rates. |
|
Returns the number of events in an interval, sampled from the Poisson distribution for the occurrence rate and interval length. |
|
Returns the times of events from an array of event rates. |
|
Calculates the weighted geometric mean of either a sequence of numbers (returning a scalar) or the element-wise weighted geometric mean of multiple sequences of numbers of equal length (i.e., the weighted geometric mean of the i-th value across all sequences), returning an array of the same length as the input sequences. |