KrySA » Tasks » Avgs

class tasks.avgs.Avgs[source]

All Task s categorized as averages under one roof.

New in version 0.2.4.

avgs_gen(*args)[source]

Get the values from address and depending on p (power) value returns either exceptional case for p == 0 (geometric mean), or a value from the generalized mean’s formula:

\[\big(\frac{1}{n}\sum_{i=1}^n x_{i}^{p} \big)^\frac{1}{p}, where:\]
  • p == -1: harmonic
  • p == 0: geometric
  • p == 1: arithmetic
  • p == 2: quadratic
  • p == 3: cubic
  • etc...

New in version 0.2.4.

avgs_inter(*args)[source]

(Not yet implemented)

avgs_median(*args)[source]

Median:

\[\begin{split}\tilde x = \left \{ \begin {array}{lr} \frac {n}{2} \in \mathbb{N}:& \frac {x_{\frac {n}{2}} + x_{\frac {n}{2}+1}}{2} \\ \frac {n+1}{2} \in \mathbb{N}:& x_{\lceil \frac {n}{2} \rceil} \end{array} \right.\end{split}\]

New in version 0.3.10.

avgs_mid(*args)[source]

(Not yet implemented)

avgs_mode(*args)[source]

Return the most common value from the list of values. If there’s more than a single value with the same amount of occurency, all values with the same occurency are returned.

New in version 0.3.10.

avgs_trim(*args)[source]

(Not yet implemented)