Package pygeodesy :: Module fstats :: Class Fcook |
[frames] | no frames]

# Class Fcook

      object --+
               |
    named._Named --+
                   |
        _FstatsNamed --+
                       |
             _FstatsBase --+
                           |
                          Fcook

Cook's `RunningStats` computing the running mean, median and (sample) kurtosis, skewness, variance, standard deviation and Jarque-Bera normality.

See Also: Fwelford and Higher-order statistics.

Instance Methods
__init__(self, xs=None, **name) New Fcook stats accumulator. |
__iadd__(self, other) Add `other` to this Fcook instance. |
fadd(self, xs, sample=False) Accumulate and return the current count. |
fjb(self, xs=None, excess=True, sample=True) Accumulate and compute the current Jarque-Bera normality. |
fjb_(self, *xs, **sample_excess) Accumulate and compute the current Jarque-Bera normality. |
fkurtosis(self, xs=None, excess=True, **sample) Accumulate and return the current kurtosis. |
fkurtosis_(self, *xs, **excess_sample) Accumulate and return the current kurtosis. |
fmedian(self, xs=None) Accumulate and return the current median. |
fmedian_(self, *xs) Accumulate and return the current median. |
fskewness(self, xs=None, **sample) Accumulate and return the current skewness. |
fskewness_(self, *xs, **sample) Accumulate and return the current skewness. |
toFwelford(self, **name) Return a Fwelford equivalent. |
Inherited from `_FstatsBase`: `fadd_`, `fmean`, `fmean_`, `fstdev`, `fstdev_`, `fvariance`, `fvariance_` Inherited from `_FstatsNamed`: `__add__`, `__float__`, `__int__`, `__len__`, `__neg__`, `__radd__`, `__str__`, `copy`, `fcopy` Inherited from `named._Named`: `__format__`, `__imatmul__`, `__matmul__`, `__repr__`, `__rmatmul__`, `attrs`, `classof`, `dup`, `methodname`, `rename`, `renamed`, `toRepr`, `toStr`, `toStr2` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

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

Method Details

### __init__ (self, xs=None, **name) (Constructor) |
New Fcook stats accumulator. Arguments: `xs` - Iterable of additional values (each `scalar`, an Fsum or Fsum2Tuple). `name` - Optional `name=NN` (`str`). Overrides: object.__init__ See Also: Method Fcook.fadd.

### __iadd__ (self, other) |
Add `other` to this Fcook instance. Arguments: `other` - An Fcook instance or value or iterable of values (each `scalar`, an Fsum or Fsum2Tuple). Returns: This instance, updated (Fcook). Raises: `TypeError` - Invalid `other`. `ValueError` - Invalid or non-finite `other`. See Also: Method Fcook.fadd.

### fadd (self, xs, sample=False) |
Accumulate and return the current count. Arguments: `xs` - Iterable of additional values (each `scalar`, an Fsum or Fsum2Tuple). `sample` - Use `sample=True` for the sample count instead of the population count (`bool`). Returns: Current, running (sample) count (`int`). Raises: `OverflowError` - Partial `2sum` overflow. `TypeError` - Invalid `xs`. `ValueError` - Invalid or non-finite `xs`. Overrides: _FstatsBase.fadd See Also: online_kurtosis.

### fjb (self, xs=None, excess=True, sample=True) |
Accumulate and compute the current Jarque-Bera normality. Arguments: `xs` - Iterable of additional values (each `scalar`, an Fsum or Fsum2Tuple). `excess` - Apply the excess kurtosis (`bool`), default. `sample` - Use `sample=False` for the population normality instead of the sample one (`bool`). Returns: Current, running (sample) Jarque-Bera normality (`float`). See Also: Method Fcook.fadd.

### fjb_ (self, *xs, **sample_excess) |
Accumulate and compute the current Jarque-Bera normality. See Also: Method Fcook.fjb for further details.

### fkurtosis (self, xs=None, excess=True, **sample) |
Accumulate and return the current kurtosis. Arguments: `xs` - Iterable of additional values (each `scalar`, an Fsum or Fsum2Tuple). `excess` - Return the excess kurtosis (`bool`), default. `sample` - Use `sample=True` for the sample kurtosis instead of the population kurtosis (`bool`). Returns: Current, running (sample) kurtosis or excess kurtosis (`float`). See Also: Kurtosis Formula and Mantalos., Method Fcook.fadd.

### fkurtosis_ (self, *xs, **excess_sample) |
Accumulate and return the current kurtosis. See Also: Method Fcook.fkurtosis for further details.

### fmedian (self, xs=None) |
Accumulate and return the current median. Arguments: `xs` - Iterable of additional values (each `scalar`, an Fsum or Fsum2Tuple). Returns: Current, running median (`float`). See Also: Pearson's Skewness Coefficients, Skewness & Kurtosis Simplified https://TowardsDataScience.com/skewness-kurtosis-simplified-1338e094fc85> and method Fcook.fadd.

### fmedian_ (self, *xs) |
Accumulate and return the current median. See Also: Method Fcook.fmedian for further details.

### fskewness (self, xs=None, **sample) |
Accumulate and return the current skewness. Arguments: `xs` - Iterable of additional values (each `scalar`, an Fsum or Fsum2Tuple). `sample` - Use `sample=True` for the sample skewness instead of the population skewness (`bool`). Returns: Current, running (sample) skewness (`float`). See Also: Skewness Formula and Mantalos., Method Fcook.fadd.

### fskewness_ (self, *xs, **sample) |
Accumulate and return the current skewness. See Also: Method Fcook.fskewness for further details.

### toFwelford (self, **name) |
Return a Fwelford equivalent. Arguments: `name` - Optional `name=NN` (`str`).