__init__.py :  » Math » Modular-toolkit-for-Data-Processing » MDP-2.6 » bimdp » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » Math » Modular toolkit for Data Processing 
Modular toolkit for Data Processing » MDP 2.6 » bimdp » __init__.py
"""
The BiMDP package is an extension of the pure feed-forward flow concept in MDP.

It defines a framework for far more general flow sequences, involving 
top-down processes (e.g. for error backpropagation) or even loops.
So the 'bi' in BiMDP primarily stands for 'bidirectional'.

BiMDP is implemented by extending both the Node and the Flow concept. Both the
new BiNode and BiFlow classes are downward compatible with the classical
Nodes and Flows, allowing them to be combined with BiMDP elements. 

The first fundamental addition in BiMDP is that BiNodes can specify a target
node for their output, to continue the flow execution at the specified target 
node. The second new feature is that Nodes can use messages to propagate
arbitrary information, in addition to the standard single array data.
A BiFlow is needed to enable these features, and the BiNode class has adds
convenience functionality to help with this. 

Another important addition are the inspection capapbilities (e.g.,
bimdo.show_training), which create and interactive HTML representation of the
data flow. This makes debugging much easier and can also be extended to
visualize data (see the demos in the test folder).
 
BiMDP fully supports and extends the HiNet and the Parallel packages.


New BiMDP concepts: Jumps and Messages
======================================

Jump targets are numbers (relative position in the flow) or strings, which are
then compared to the optional node_id. The target number 0 refers to the node
itself.
During execution a node can also use the value of EXIT_TARGET (which is
currently just 'exit') as target value to end the execution. The BiFlow
will then return the last output as result.  

Messages are standard Python dictionaries to transport information
that would not fit well into the standard x array. The dict keys also support
target specifications and other magic for more convenient usage.
This is described in more detail in the BiNode module.
"""

### T O D O ###

# TODO: include SVM based classifiers in the autogenerated biclassifiers

# ------------- optional ----------------

# TODO: add some help for using coroutines (or maybe for the state pattern?)
#    in BiNode, maybe in a special subclass.

# TODO: add a target seperator that does not remove the key. Could use
#    -> remove key
#    --> remove one '-' on entry
#    => do not remove the key
#  Note that adding this kind of magic is relatively cheap in BiNode,
#  in parsing first check just for > .

# TODO: add wildcard support for node_id in message keys.
#    Simply tread the node_id part of the key as a regex and check for match.
#    This adds an overhead of about 1 sec per 100,000 messages.

# TODO: Would it make sense to guarantee that join/fork is always called on
#    the original node? For fork this would prevent caching, for join this
#    would prevent gathering the results in remote nodes/processes.
#    Could be optional depending on node, fork could somehow return a
#    non-forkable node?

# TODO: Implement more internal checks for node output result?
#    Check that last element is not None? Use assume?

# TODO: implement switchlayer, a layer where each column represents a different
#    target, so the target value determines which nodes are used

# TODO: show more information in trace slides via mouse hover,
#    or enable some kind of folding (might be possible via CSS like suckerfish)


from binode import BiNodeException,BiNode,MSG_ID_SEP
from biclassifier import BiClassifier
from biflow import (
    MessageResultContainer, BiFlowException, BiFlow, BiCheckpointFlow,
    EXIT_TARGET
)
# the inspection stuff is considered a core functionality
from inspection import *

import nodes
import hinet
import parallel
from test import test

del binode
del biflow
del inspection
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.