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

Class Stats2

source code

BasicStats --+
             |
            Stats2

Statistics of a random tensor (RT) consisting of:

are packed as a tuple.



Instance Methods [hide private]
 
__init__(self, J, shape, A=None)
Initialize Stats2 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
 
project(self, w)
Linearly project the RTs down to a line using direction w.
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 Stats2 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

project(self, w)

source code 

Linearly project the RTs down to a line using direction w. The projected variances are replaced by the projected standard deviations. Return the projected statistics.

Input:
w: the projecting direction.
Output:
B: the Stats2e obtained from projecting the RTs.

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