feature_vector_vis¶
Module: missions.nodes.visualization.feature_vector_vis
¶
Visualize FeatureVector
elements
Inheritance diagram for pySPACE.missions.nodes.visualization.feature_vector_vis
:
Class Summary¶
LLEVisNode ([neighbors]) |
Show a 2d scatter plot of all FeatureVector based on Locally Linear Embedding (LLE) from MDP |
MnistVizNode ([mode, history_index, max_samples]) |
Node for plotting MNIST Data |
Classes¶
LLEVisNode
¶
-
class
pySPACE.missions.nodes.visualization.feature_vector_vis.
LLEVisNode
(neighbors=15, **kwargs)[source]¶ Bases:
pySPACE.missions.nodes.base_node.BaseNode
Show a 2d scatter plot of all
FeatureVector
based on Locally Linear Embedding (LLE) from MDPThis node collects all training examples it obtains along with their label. It computes than an embedding of all these examples in a 2d space using the “Locally Linear Embedding” algorithm and plots a scatter plot of the examples in this space.
Parameters
neighbors: The number of neighbor vectors that should be considered for each instance during locally linear embedding
(optional, default: 15)
Exemplary Call
- node : Time_Series_Source - node : All_Train_Splitter - node : Time_Domain_Features - node : LLE_Vis parameters : neighbors : 10 - node : Nil_Sink
Known Issues: This node will use pylab.show() to show the figure. There is no store method implemented yet. On Macs, pylab.show() might sometimes fail due to a wrong plotting backend. A possible workaround in that case is to manually set the plotting backend to ‘MacOSX’. This has to be done before pylab is imported, so one can temporarily add “import matplotlib; matplotlib.use(‘MacOSX’)” to the very beginning of launch.py.
Author: Jan Hendrik Metzen (jhm@informatik.uni-bremen.de)
Created: 2009/07/07
POSSIBLE NODE NAMES: - LLE_Vis
- LLEVis
- LLEVisNode
POSSIBLE INPUT TYPES: - FeatureVector
Class Components Summary
_execute
(data)_get_train_set
(use_test_data)Returns the data that can be used for training _stop_training
([debug])Stops the training, i.e. _train
(data, label)This node is not really trained but uses the labeled examples to generate a scatter plot. input_types
is_supervised
()Returns whether this node requires supervised training is_trainable
()Returns whether this node is trainable. -
input_types
= ['FeatureVector']¶
-
_train
(data, label)[source]¶ This node is not really trained but uses the labeled examples to generate a scatter plot.
MnistVizNode
¶
-
class
pySPACE.missions.nodes.visualization.feature_vector_vis.
MnistVizNode
(mode=None, history_index=0, max_samples=10, **kwargs)[source]¶ Bases:
pySPACE.missions.nodes.base_node.BaseNode
Node for plotting MNIST Data
- Parameters
mode: One of FeatureVector, PredictionVector, and nonlinear.
If FeatureVector is taken, the data is assumed to be in the 28x28 format and can be visualized like the original data.
If PredictionVector is chosen, the affine backtransformation approach is used. If possible, the visualization is enhanced by the average data found in the data history at the history_index.
If nonlinear os used, a nonlinear processing chain is assumed for calculating the backtransformation with derivatives with the sample at the
If not specified, the input data type is used.
(recommended, default: input type)
history_index: Index for determining the averaging data or the data for calculating the derivative from prediction vectors. To save the respective data, the keep_in_history parameter has to be used, in the node, which produces the needed data. This can be a Noop node at the beginning.
By default the last stored sample is used.
(recommended, default: last sample)
max_samples: In case of the nonlinear mode, a backtransformation graphic must be generated for every data sample. To reduce memory usage, only the first max_*samples training samples are used.
(optional, default: 10)
Exemplary Call
- node : MnistViz
POSSIBLE NODE NAMES: - MnistViz
- MnistVizNode
POSSIBLE INPUT TYPES: - PredictionVector
- FeatureVector
- TimeSeries
Class Components Summary
_train
(data, label)Average data with labels (no real training) input_types
is_supervised
()Labels are required for visualization is_trainable
()Labels are required for visualization store_state
(result_dir[, index])Main method which generates and stores the graphics -
input_types
= ['PredictionVector', 'FeatureVector', 'TimeSeries']¶