| Home | Trees | Indices | Help |
|
|---|
|
|
Perform a (generalized) Fisher Discriminant Analysis of its
input. It is a supervised node that implements FDA using a
generalized eigenvalue approach.
FDANode has two training phases and is supervised so make sure to
pay attention to the following points when you train it:
- call the 'train' function with *two* arguments: the input data
and the labels (see the doc string of the train method for details)
- if you are training the node by hand, call the train function twice
- if you are training the node using a flow (recommended), the
only argument to Flow.train must be a list of (data_point,
label) tuples or an iterator returning lists of such tuples,
*not* a generator. The Flow.train function can be called just
once as usual, since it takes care of "rewinding" the iterator
to perform the second training step.
More information on Fisher Discriminant Analysis can be found for
example in C. Bishop, Neural Networks for Pattern Recognition,
Oxford Press, pp. 105-112.
Internal variables of interest:
self.avg -- Mean of the input data (available after training)
self.v -- Transposed of the projection matrix, so that
output = dot(input-self.avg, self.v)
(available after training)
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| Inherited from Node | |||
|---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| 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' function 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.
|
|
|
|
|
|
|
|
|
Compute the output of the FDA projection.
if 'range' is a number, then use the first 'range' functions.
if 'range' is the interval=(i,j), then use all functions
between i and j.
|
Update the internal structures according to the input data 'x'.
x -- a matrix having different variables on different columns
and observations on the rows.
cl -- can be a list, tuple or array of labels (one for each data point)
or a single label, in which case all input data is assigned to
the same class.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu May 15 15:13:40 2008 | http://epydoc.sourceforge.net |