Package recsql :: Module sqlfunctions :: Class _Stdev
[hide private]
[frames] | no frames]

Class _Stdev

source code

object --+
         |
        _Stdev

Implement standard deviation of the sample as SQL aggregate function. (Uses N-1 variance.) Do it in one pass (see eg http://smallcode.weblogs.us/2006/11/27/calculate-standard-deviation-in-one-pass/ though we may run in an underflow by calculating N/N-1<X^2-<X>^2>.).

Also, we don't check if our arguments are valid as numbers.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
step(self, x) source code
 
finalize(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)