Package mdp :: Package nodes :: Class TDSEPNode
[hide private]
[frames] | no frames]

type TDSEPNode


Perform Independent Component Analysis using the TDSEP algorithm.
Note that TDSEP, as implemented in this Node, is an online algorithm,
i.e. it is suited to be trained on huge data sets, provided that the
training is done sending small chunks of data for each time.

Reference:
Ziehe, Andreas and Muller, Klaus-Robert (1998).
TDSEP an efficient algorithm for blind separation using time structure
in Niklasson, L, Boden, M, and Ziemke, T (Editors), Proc. 8th Int. Conf. 
Artificial Neural Networks (ICANN 1998).

Internal variables of interest:

  self.white       -- the whitening node used for preprocessing.
  self.filters     -- the ICA filters matrix (this is the transposed of the
                    projection matrix after whitening).
  self.convergence -- the value of the convergence threshold.

Instance Methods [hide private]
 
__init__(self, lags=1, limit=1e-05, max_iter=10000, verbose=False, whitened=False, white_comp=None, white_parm={}, input_dim=None, dtype=None)
Input arguments:
 
_stop_training(self, covs)
 
get_projmatrix(self, transposed=1)
Return the projection matrix.
 
get_recmatrix(self, transposed=1)
Return the back-projection matrix (i.e.
    Inherited from ISFANode
 
_adjust_ica_sfa_coeff(self)
 
_do_sweep(self, covs, Q, prev_contrast)
 
_execute(self, x)
 
_fix_covs(self, covs=None)
 
_fmt_prog_info(self, sweep, pert, contrast, sfa=None, ica=None)
 
_get_contrast(self, covs, bica_bsfa=None)
 
_get_eye(self)
 
_get_rnd_permutation(self, dim)
 
_get_rnd_rotation(self, dim)
 
_get_supported_dtypes(self)
Return the list of dtypes supported by this node.
 
_givens_angle(self, i, j, covs, bica_bsfa=None, complete=0)
 
_givens_angle_case1(self, m, n, covs, bica_bsfa, complete=0)
 
_givens_angle_case2(self, m, n, covs, bica_bsfa, complete=0)
 
_inverse(self, y)
 
_optimize(self)
 
_set_dtype(self, dtype)
 
_set_input_dim(self, n)
 
_train(self, x)
 
stop_training(self, covs=None)
Stop the training phase.
    Inherited from Node
 
__call__(self, x)
Calling an instance if Node is equivalent to call its 'execute' method.
 
__repr__(self)
 
__str__(self)
 
_check_input(self, x)
 
_check_output(self, y)
 
_check_train_args(self, x, *args, **kwargs)
 
_get_train_seq(self)
 
_if_training_stop_training(self)
 
_pre_execution_checks(self, x)
This method contains all pre-execution checks.
 
_pre_inversion_checks(self, y)
This method contains all pre-inversion checks.
 
_refcast(self, x)
Helper function to cast arrays to the internal dtype.
 
_set_output_dim(self, n)
 
copy(self, protocol=-1)
Return a deep copy of the node.
 
execute(self, x, *args, **kargs)
Process the data contained in 'x'.
 
get_current_train_phase(self)
Return the index of the current training phase.
 
get_dtype(self)
Return dtype.
 
get_input_dim(self)
Return input dimensions.
 
get_output_dim(self)
Return output dimensions.
 
get_remaining_train_phase(self)
Return the number of training phases still to accomplish.
 
get_supported_dtypes(self)
Return dtypes supported by the node as a list of numpy.dtype objects.
 
inverse(self, y, *args, **kargs)
Invert 'y'.
 
is_invertible(self)
Return True if the node can be inverted, False otherwise.
 
is_trainable(self)
Return True if the node can be trained, False otherwise.
 
is_training(self)
Return True if the node is in the training phase, False otherwise.
 
save(self, filename, protocol=-1)
Save a pickled representation of the node to 'filename'.
 
set_dtype(self, t)
Set Node's internal structures dtype.
 
set_input_dim(self, n)
Set input dimensions.
 
set_output_dim(self, n)
Set output dimensions.
 
train(self, x, *args, **kwargs)
Update the internal structures according to the input data 'x'.
Properties [hide private]
    Inherited from Node
  _train_seq
List of tuples: [(training-phase1, stop-training-phase1), (training-phase2, stop_training-phase2), ...
  dtype
dtype
  input_dim
Input dimensions
  output_dim
Output dimensions
  supported_dtypes
Supported dtypes
Method Details [hide private]

__init__(self, lags=1, limit=1e-05, max_iter=10000, verbose=False, whitened=False, white_comp=None, white_parm={}, input_dim=None, dtype=None)
(Constructor)

 

Input arguments:

lags    -- list of time-lags to generate the time-delayed covariance
           matrices. If lags is an integer, time-lags 1,2,...,'lags'
           are used.
           Note that time-lag == 0 (instantaneous correlation) is
           always implicitly used.

whitened -- Set whitened is True if input data are already whitened.
            Otherwise the node will whiten the data itself.

white_comp -- If whitened is False, you can set 'white_comp' to the
              number of whitened components to keep during the
              calculation (i.e., the input dimensions are reduced to
              white_comp by keeping the components of largest variance).

white_parm -- a dictionary with additional parameters for whitening.
              It is passed directly to the WhiteningNode constructor.
              Ex: white_parm = { 'svd' : True }

limit -- convergence threshold.

max_iter     -- If the algorithms does not achieve convergence within
                max_iter iterations raise an Exception. Should be
                larger than 100.

Overrides: Node.__init__

_stop_training(self, covs)

 
Overrides: Node._stop_training

get_projmatrix(self, transposed=1)

 
Return the projection matrix.

get_recmatrix(self, transposed=1)

 
Return the back-projection matrix (i.e. the reconstruction matrix).
Note that if the unknown sources are white, this is a good
approximation of the mixing matrix (up to a permutation matrix).