Home | Trees | Indices | Help |
|
---|
|
Perform Factor Analysis. The current implementation should be most efficient for long data sets: the sufficient statistics are collected in the training phase, and all EM-cycles are performed at its end. The 'execute' function returns the Maximum A Posteriori estimate of the latent variables. The 'generate_input' function generates observations from the prior distribution. tol -- tolerance (minimum change in log-likelihood before exiting the EM algorithm) max_cycles -- maximum number of EM cycles verbose -- if True, print log-likelihood during the EM-cycles Internal variables of interest: self.mu -- Mean of the input data (available after training) self.A -- Generating weights (available after training) self.E_y_mtx -- Weights for Maximum A Posteriori inference self.sigma -- Vector of estimated variance of the noise for all input components More information about Factor Analysis can be found in Max Welling's classnotes: http://www.ics.uci.edu/~welling/classnotes/classnotes.html , in the chapter 'Linear Models'.
|
|||
Inherited from Node | |||
---|---|---|---|
__metaclass__ This Metaclass is meant to overwrite doc strings of methods like execute, stop_training, inverse with the ones defined in the corresponding private methods _execute, _stop_training, _inverse, etc... |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|||
Inherited from Node | |||
---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
Inherited from |
|||
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 |
|
If the input dimension and the output dimension are unspecified, they will be set when the 'train' or 'execute' method is called for the first time. If dtype is unspecified, it will be inherited from the data it receives at the first call of 'train' or 'execute'. Every subclass must take care of up- or down-casting the internal structures to match this argument (use _refcast private method when possible).
|
|
Return the list of dtypes supported by this node.
|
|
|
Generate data from the prior distribution. If the training phase has not been completed yet, call stop_training. Input arguments: len_or_y -- If integer, it specified the number of observation to generate. If array, it is used as a set of samples of the latent variables noise -- if True, generation includes the estimated noise |
Return True if the node can be inverted, False otherwise.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Oct 9 06:08:51 2009 | http://epydoc.sourceforge.net |