| Home | Trees | Indices | Help |
|
|---|
|
|
This node implements "Graph-Based SFA (GSFA)", which is the main component of hierarchical GSFA (HGSFA).
For further information, see: Escalante-B A.-N., Wiskott L, "How to solve classification and regression problems on high-dimensional data with a supervised extension of Slow Feature Analysis". Journal of Machine Learning Research 14:3683-3719, 2013
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
| Inherited from Node | |||
|---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| Inherited from Node | |||
|---|---|---|---|
|
|||
|
|||
|
|||
|
Inherited from |
|||
| Inherited from Node | |||
|---|---|---|---|
|
_train_seq List of tuples: |
|||
|
dtype dtype |
|||
|
input_dim Input dimensions |
|||
|
output_dim Output dimensions |
|||
|
supported_dtypes Supported dtypes |
|||
|
|||
Initializes the GSFA node, which is a subclass of the SFA node. The parameters block_size and train_mode are not necessary and it is recommended to skip them here and provide them as parameters to the train method. See the _train method for details.
|
Compute the output of the slowest functions. If 'n' is an integer, then use the first 'n' slowest components.
|
This function uses a pseudoinverse of the matrix sf to approximate an inverse to the transformation.
|
|
|
This is the main training function of GSFA.
x: training data (each sample is a row)
The semantics of the remaining parameters depends on the training mode
(train_mode) parameter in order to train as in standard SFA:
set train_mode="regular" (the scale of the features should be
corrected afterwards)
in order to train using the clustered graph:
set train_mode="clustered". The cluster size is given by block_size
(integer). Variable cluster sizes are possible if block_size is a
list of integers. Samples belonging to the same class should be
adjacent.
in order to train for classification:
set train_mode=("classification", labels, weight), where labels is
an array with the class information and weight is a scalar value
(e.g., 1.0).
in order to train for regression:
set train_mode=("serial_regression#", labels, weight), where # is
an integer that specifies the block size used by a serial graph,
labels is an array with the label information and weight is a
scalar value.
in order to train using a graph without edges:
set train_mode="unlabeled".
in order to train using the serial graph:
set train_mode="serial", and use block_size (integer) to specify
the group size.
in order to train using the mixed graph:
set train_mode="mixed", and use block_size (integer) to specify
the group size.
in order to train using an arbitrary user-provided graph:
set train_mode="graph", specify the node_weights (numpy 1D array),
and the edge_weights (numpy 2D array).
|
|
|
Stop the training phase. By default, subclasses should overwrite _stop_training to implement this functionality. The docstring of the _stop_training method overwrites this docstring.
|
This is the main training function of GSFA.
x: training data (each sample is a row)
The semantics of the remaining parameters depends on the training mode
(train_mode) parameter in order to train as in standard SFA:
set train_mode="regular" (the scale of the features should be
corrected afterwards)
in order to train using the clustered graph:
set train_mode="clustered". The cluster size is given by block_size
(integer). Variable cluster sizes are possible if block_size is a
list of integers. Samples belonging to the same class should be
adjacent.
in order to train for classification:
set train_mode=("classification", labels, weight), where labels is
an array with the class information and weight is a scalar value
(e.g., 1.0).
in order to train for regression:
set train_mode=("serial_regression#", labels, weight), where # is
an integer that specifies the block size used by a serial graph,
labels is an array with the label information and weight is a
scalar value.
in order to train using a graph without edges:
set train_mode="unlabeled".
in order to train using the serial graph:
set train_mode="serial", and use block_size (integer) to specify
the group size.
in order to train using the mixed graph:
set train_mode="mixed", and use block_size (integer) to specify
the group size.
in order to train using an arbitrary user-provided graph:
set train_mode="graph", specify the node_weights (numpy 1D array),
and the edge_weights (numpy 2D array).
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1-MDP on Mon Apr 27 21:56:18 2020 | http://epydoc.sourceforge.net |