Home | Trees | Indices | Help |
|
---|
|
object --+ | RunningMean
Running mean calculator.
This class can be used to calculate the mean of elements from a list, tuple, iterable or any other data source. The mean is calculated on the fly without explicitly summing the values, so it can be used for data sets with arbitrary item count. Also capable of returning the standard deviation (also calculated on the fly)
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
mean the current mean |
|||
result the current mean and standard deviation as a tuple |
|||
sd the current standard deviation |
|||
Inherited from |
|
Initializes the running mean calculator. Optionally the number of already processed elements and an initial mean can be supplied if we want to continue an interrupted calculation.
|
Adds the values in the given iterable to the elements from which we
calculate the mean. Can also accept a single number. The left shift
( >>> rm=RunningMean() >>> rm << [1,2,3,4] (2.5, 1.6666666666667)
|
str(x)
|
Adds the given value to the elements from which we calculate the mean and the standard deviation.
|
Adds the values in the given iterable to the elements from which we
calculate the mean. Can also accept a single number. The left shift
( >>> rm=RunningMean() >>> rm << [1,2,3,4] (2.5, 1.6666666666667)
|
|
meanthe current mean
|
resultthe current mean and standard deviation as a tuple
|
sdthe current standard deviation
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Aug 16 21:30:47 2008 | http://epydoc.sourceforge.net |