Package pygeodesy :: Module fmath :: Class Fwelford |
[frames] | no frames]

# Class Fwelford

      object --+
               |
    named._Named --+
                   |
                  Fwelford

Welford's accumulator computing the running mean, sample variance and standard deviation.

See Also: Cook and Cook.

Instance Methods
__init__(self, *xs, **name) New Fwelford accumulator. |
__len__(self) Return the total number of accumulated values (`int`). |
fcopy(self, deep=False, name='') Copy this instance, `shallow` or `deep`. |
copy(self, deep=False, name='') Copy this instance, `shallow` or `deep`. |
fmean_(self, *xs) Accumulate and return the running mean. |
fstdev_(self, *xs, **sample) Accumulate and return the running standard deviation. |
fvariance_(self, *xs, **sample) Accumulate and return the running variance. |
Inherited from `named._Named`: `_DOT_`, `__imatmul__`, `__matmul__`, `__repr__`, `__rmatmul__`, `__str__`, `attrs`, `classof`, `dup`, `rename`, `toRepr`, `toStr`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### __init__ (self, *xs, **name) (Constructor) |
New Fwelford accumulator. Arguments: `xs` - Optional, initial values (`scalar`s). `name` - Optional name (`str`). Raises: `OverflowError` - Partial `2sum` overflow. `TypeError` - Non-scalar `s` value. `ValueError` - Invalid or non-finite `xs` value. Overrides: object.__init__

### fcopy (self, deep=False, name='') |
Copy this instance, `shallow` or `deep`. Arguments: `deep` - If `True` make a deep, otherwise a shallow copy (`bool`). `name` - Optional, non-empty name (`str`). Returns: The copy (Fwelford).

### copy (self, deep=False, name='') |
Copy this instance, `shallow` or `deep`. Arguments: `deep` - If `True` make a deep, otherwise a shallow copy (`bool`). `name` - Optional, non-empty name (`str`). Returns: The copy (Fwelford). Overrides: named._Named.copy

### fmean_ (self, *xs) |
Accumulate and return the running mean. Arguments: `xs` - Additional values to accumulate (`scalar`s). Returns: Current, running mean (`float`).

### fstdev_ (self, *xs, **sample) |
Accumulate and return the running standard deviation. Arguments: `xs` - Additional values to accumulate (`scalar`s). `sample` - If `True` use the reduced number of accumulated values (`bool`). Returns: Current, running standard deviation (`float`).

### fvariance_ (self, *xs, **sample) |
Accumulate and return the running variance. Arguments: `xs` - Additional values to accumulate (`scalar`s). `sample` - If `True` use the reduced number of accumulated values (`bool`). Returns: Current, running variance (`float`).