lmpy.statistics.running_stats
Class for keeping track of running statistics to save memory.
Note
- Mean and standard deviation computations based on
 
Module Contents
Classes
| Construct a RunningStats instance. | 
Functions
| 
 | Compares the absolute values of the observed and random data. | 
| 
 | Compares the signed values of the observed and random data. | 
- class lmpy.statistics.running_stats.RunningStats(observed=None, compare_fn=compare_absolute_values)[source]
- Bases: - object- Construct a RunningStats instance. - Parameters
- observed (numeric) – The observed value to be used when computing an F-statistic. It can be a single value or an array-type. 
- ( (compare_fn) – obj:method): A function used to compare pushed values to the observed statistic value. 
 
 - property p_values[source]
- Retrieve p-values from the test values greater than the f-statistic. - Returns
- Computed p-values. 
- Return type
- Raises
- Exception – Raised if there are no observed values. 
 
 - property standard_deviation[source]
- Retrieve the standard deviation of the test values. - Returns
- The standard deviation of the test values. 
- Return type
- float 
 
 
- lmpy.statistics.running_stats.compare_absolute_values(observed, test_data)[source]
- Compares the absolute values of the observed and random data. - Parameters
- observed ( - Numpy array) – A numpy array of observed values.
- test_data ( - Numpy array) – A numpy array of random values.
 
- Returns
- Boolean indicating if the absolute value of the test data is greater than
- the absolute value of the observed data. 
 
- Return type
- bool 
 
- lmpy.statistics.running_stats.compare_signed_values(observed, test_data)[source]
- Compares the signed values of the observed and random data. - Parameters
- observed ( - Numpy array) – A numpy array of observed values.
- test_data ( - Numpy array) – A numpy array of random values.
 
- Returns
- An indication if the test data is greater than the observed data. 
- Return type
- bool