Package pylearn :: Package shared :: Package layers :: Module kording2004
[hide private]

Module kording2004

source code

Classes [hide private]
Kording2004
This implements the Kording2004 cost using a dynamicly tracked mean, but not a dynamically tracked variance.
Functions [hide private]
 
debug(*msg) source code
 
info(*msg) source code
 
warn(*msg) source code
 
warning(*msg) source code
 
error(*msg) source code
 
cov_sum_of_squares(z, hint='tall', bias=0)
Return the sum of the squares of all terms in the covariance of [normalized-and-centered] z
source code
 
var_sum_of_squares(z, bias=0)
Return the sum of squared variances in the columns of centered variable z
source code
 
kording2004_normalized_decorrelation3(z, hint='fat')
Return the sum of the squares of the off-diagonal terms of an uncentered covariance matrix
source code
 
kording2004_normalized_slowness3(z, slowness_type='l2')
Return the average squared difference between each feature response and its previous response.
source code
Variables [hide private]
  _logger = logging.getLogger('kording2004')

Imports: numpy, theano, mean, ExponentialMean, logging


Function Details [hide private]

cov_sum_of_squares(z, hint='tall', bias=0)

source code 

Return the sum of the squares of all terms in the covariance of [normalized-and-centered] z

:param hint: either 'tall' or 'fat' to indicate whether the computation should be carried out on the gram matrix or in the covariance matrix.

:note: This is computed using either the inner or outer-product depending on the `hint`

kording2004_normalized_decorrelation3(z, hint='fat')

source code 

Return the sum of the squares of the off-diagonal terms of an uncentered covariance matrix

:param z: a matrix of feature responses. Each row is the responses at one time-step.

These features must have marginal mean 0 and variance 1 for this cost to make sense as a training criterion.

:note: This is computed using the gram matrix, not the covariance matrix

kording2004_normalized_slowness3(z, slowness_type='l2')

source code 

Return the average squared difference between each feature response and its previous response.

:param z: a 3-tensor of feature responses. Indexed [sequence][frame][feature]

These features must have marginal mean 0 and variance 1 for this cost to make sense as a training criterion.