Package mdp :: Package hinet
[hide private]
[frames] | no frames]

Package hinet

Hierarchical Networks Package.

This package makes it possible to construct graph-like Node structures,
especially hierarchical networks.

The most important building block is the new Layer node, which works as an
horizontal version of flow. It encapsulates a list of Nodes, which are trained
and executed in parallel.
For example we can take two Nodes with 100 dimensional input to
construct a layer with a 200 dimensional input. The first half of the input
data is automatically fed into the first Node, the second half into the second
Node.

Since one might also want to use Flows (i.e. vertical stacks of Nodes) in a
Layer, a wrapper class for Nodes is provided.
The FlowNode class wraps any Flow into a Node, which can then be used like any
other Node. Together with the Layer this allows you to combine Nodes both
horizontally and vertically. Thereby one can in principle realize
any feed-forward network topology.

For a hierarchical networks one might want to route the different parts of the
data to different Nodes in a Layer in complicated ways. This is done by a
Switchboard that handles all the routing.
Defining the routing manually can be quite tedious, so one can derive subclasses
for special routing situations. One such subclass for 2d image data is provided.
It maps the data according to rectangular overlapping 2d input areas. One can
then feed the output into a Layer and each Node will get the correct input.

Classes [hide private]
  ChannelSwitchboard
Base class for Switchboards in which the data is bundled into channels.
  CircularOnlineFlowNode
CircularOnlineFlowNode wraps a CircularOnlineFlow of OnlineNodes into a single OnlineNode.
  CloneLayer
Layer with a single node instance that is used multiple times.
  CloneOnlineLayer
OnlineLayer with a single node instance that is used multiple times.
  DoubleRect2dSwitchboard
Special 2d Switchboard where each inner point is covered twice.
  DoubleRect2dSwitchboardException
Exception for routing problems in the DoubleRect2dSwitchboard class.
  DoubleRhomb2dSwitchboard
Rectangular lattice switchboard covering a rhombic lattice.
  DoubleRhomb2dSwitchboardException
Exception for routing problems in the DoubleRhomb2dSwitchboard class.
  FlowNode
FlowNode wraps a Flow of Nodes into a single Node.
  HiNetHTMLVisitor
Class to convert a hinet flow to HTML.
  HiNetXHTMLVisitor
Modified converter to create valid XHTML.
  Layer
Layers are nodes which consist of multiple horizontally parallel nodes.
  NewlineWriteFile
Decorator for file-like object.
  OnlineFlowNode
OnlineFlowNode wraps an OnlineFlow of OnlineNodes into a single OnlineNode.
  OnlineLayer
OnlineLayers are nodes which consist of multiple horizontally parallel OnlineNodes.
  Rectangular2dSwitchboard
Switchboard for a 2-dimensional topology.
  Rectangular2dSwitchboardException
Exception for routing problems in the Rectangular2dSwitchboard class.
  SameInputLayer
SameInputLayer is a layer were all nodes receive the full input.
  SameInputOnlineLayer
SameInputOnlineLayer is an OnlineLayer were all nodes receive the full input.
  Switchboard
Does the routing associated with the connections between layers.
  SwitchboardException
Exception for routing problems in the Switchboard class.
Functions [hide private]
 
get_2d_image_switchboard(image_size_xy)
Return a Rectangular2dSwitchboard representing an image.
 
show_flow(flow, filename=None, title='MDP flow display', show_size=False, browser_open=True)
Write a flow into a HTML file, open it in the browser and return the file name.
Variables [hide private]
  __package__ = 'mdp.hinet'
Function Details [hide private]

get_2d_image_switchboard(image_size_xy)

 
Return a Rectangular2dSwitchboard representing an image.

This can then be used as the prev_switchboard.

show_flow(flow, filename=None, title='MDP flow display', show_size=False, browser_open=True)

 
Write a flow into a HTML file, open it in the browser and
return the file name.

flow -- The flow to be shown.
filename -- Filename for the HTML file to be created. If None
            a temporary file is created.
title -- Title for the HTML file.
show_size -- Show the approximate memory footprint of all nodes.
browser_open -- If True (default value) then the slideshow file is
    automatically opened in a webbrowser.


Variables Details [hide private]

__package__

Value:
'mdp.hinet'