Package mdp :: Package utils :: Class QuadraticForm
[hide private]
[frames] | no frames]

Class QuadraticForm



Define an inhomogeneous quadratic form as 1/2 x'Hx + f'x + c .
This class implements the quadratic form analysis methods
presented in:

Berkes, P. and Wiskott, L. (2006). On the analysis and interpretation
of inhomogeneous quadratic forms as receptive fields. Neural
Computation, 18(8): 1868-1895.

Instance Methods [hide private]
 
__init__(self, H, f=None, c=None, dtype='d')
The quadratic form is defined as 1/2 x'Hx + f'x + c .
 
_eig_sort(self, x)
 
_maximize(self, norm, tol=0.0001, x0=None, factor=None)
 
apply(self, x)
Apply the quadratic form to the input vectors.
 
get_extrema(self, norm, tol=0.0001)
Find the input vectors xmax and xmin with norm 'nrm' that maximize or minimize the quadratic form.
 
get_invariances(self, xstar)
Compute invariances of the quadratic form at extremum 'xstar'.

Inherited from unreachable.newobject: __long__, __native__, __nonzero__, __unicode__, next

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, H, f=None, c=None, dtype='d')
(Constructor)

 

The quadratic form is defined as 1/2 x'Hx + f'x + c .
'dtype' specifies the numerical type of the internal structures.

Overrides: object.__init__

_eig_sort(self, x)

 

_maximize(self, norm, tol=0.0001, x0=None, factor=None)

 

apply(self, x)

 
Apply the quadratic form to the input vectors.
Return 1/2 x'Hx + f'x + c .

get_extrema(self, norm, tol=0.0001)

 

Find the input vectors xmax and xmin with norm 'nrm' that maximize
or minimize the quadratic form.

tol: norm error tolerance

get_invariances(self, xstar)

 
Compute invariances of the quadratic form at extremum 'xstar'.
Outputs:

 w  -- w[:,i] is the direction of the i-th invariance
 nu -- nu[i] second derivative on the sphere in the direction w[:,i]