Package pycv :: Package cs :: Package stats :: Module stats :: Class Stats2e
[hide private]
[frames] | no frames]

Class Stats2e

source code

BasicStats --+
             |
            Stats2e


Statistics of a random tensor (RT) up to 2nd-order are packed as a tuple.
The statistics used in this class:
    - a total weight
    - a mean tensor
    - a tensor of standard deviations per dimension.



Instance Methods [hide private]
 
__init__(self, J, shape, A=None)
Initialize Stats2e with J and shape and optional A.
source code
 
_new_dA(self, new_shape, new_A)
This function is to be virtuallized and used internally only.
source code
 
learn(self, input_point, j, w=None)
Add a new input point of class j with optional weight w into the stats.
source code

Inherited from BasicStats: get_cond_stat, get_indices, get_stat, set_cond_stat, take

Method Details [hide private]

__init__(self, J, shape, A=None)
(Constructor)

source code 
Initialize Stats2e with J and shape and optional A.
Overrides: BasicStats.__init__

_new_dA(self, new_shape, new_A)

source code 
This function is to be virtuallized and used internally only. To create a copy of this 'self' with new 'shape' and new 'A'.
Overrides: BasicStats._new_dA

learn(self, input_point, j, w=None)

source code 

Add a new input point of class j with optional weight w into the stats.

Input:
input_point: input point, same shape with 'shape' j: its class w: optional weight, or 1 if not specified
Output:
nothing, just update the stats