

Feed-forward
neural network for python (ffnet)
Author: Marek Wojciechowski
License: GPL
Table of contents
- Feed-forward
neural network for python (ffnet)
- Table of contents
- News
- Overview
- Examples
- Documentation
- Download
- Installation
- Reporting bugs
- Notes
News
23/10/2007
ffnet 0.6.1 released! Source packages, Gentoo ebuilds and Windows
binaries are available for download at:
http://sourceforge.net/projects/ffnet
This is mainly bugfix release.
NEW FEATURES
- added 'readdata' function (simplifies reading training data
from ASCII files)
CHANGES & BUG FIXES
- fixed bug preventing ffnet form working with scipy-0.6
- importing ffnet doesn't need matplotlib now (really)
- corrections in fortran code generators
Older news
Overview
ffnet is a fast and easy-to-use feed-forward neural
network training solution for python.
Unique features:
1. Any network connectivity without cycles is allowed.
2. Training can be performed with use of several optimization
schemes including: standard backpropagation with momentum, rprop,
conjugate gradient, bfgs, tnc, genetic alorithm based optimization.
3. There is access to exact partial derivatives of network outputs
vs. its inputs.
4. Automatic normalization of data.
Basic assumptions and limitations:
1. Network has feed-forward architecture.
2. Input units have identity activation function,
all other units have sigmoid activation function.
3. Provided data are automatically normalized, both input and output,
with a linear mapping to the range (0.15, 0.85).
Each input and output is treated separately (i.e. linear map is
unique for each input and output).
4. Function minimized during training is a sum of squared errors
of each output for each training pattern.
Performance:
Excellent computational performance is achieved implementing core
functions in fortran 77 and wrapping them with f2py. ffnet outstands
in performance pure python training packages and is competitive to
'compiled language' software. Moreover, a trained network can be
exported to fortran sources, compiled and called in many
programming languages.
Usage:
Basic usage of the package is outlined below:
See documentation of ffnet module and class for datailed explanations.
from ffnet import ffnet, mlgraph, savenet, loadnet, exportnet
conec = mlgraph( (2,2,1) )
net = ffnet(conec)
input = [ [0.,0.], [0.,1.], [1.,0.], [1.,1.] ]
target = [ [1.], [0.], [0.], [1.] ]
net.train_tnc(input, target, maxfun = 1000)
net.test(input, target, iprint = 2)
savenet(net, "xor.net")
exportnet(net, "xor.f")
net = loadnet("xor.net")
answer = net( [ 0., 0. ] )
partial_derivatives = net.derivative( [ 0., 0. ] )
Examples
Training script examples (included in the source distribution):
1. Pattern
recognition example (see also plots: image1, image2)
2. Sine training example
(see also plots: image1)
3. XOR problem example (see generated fortan source code xor.f )
4. Emulating Black-Scholes stock prices (see fitness achieved with ffnet)
Network architecture examples:
1. mlgraph (standard multilayer)
2. tmlgraph
3. imlgraph
Documentation
Automatically generated documentation of ffnet modules is avilable on-line.
Download
Source packages, Gentoo ebuilds and Windows binaries
are available for download at sourceforge download page.
You can also checkout development version of the source code
from the project
subversion repository:
svn co https://ffnet.svn.sourceforge.net/svnroot/ffnet/trunk ffnet
Installation
Installation instructions can be found in:
http://downloads.sourceforge.net/ffnet/README
Reporting bugs
This project is hosted by sourceforge. Bug tracker, forum and a mailing list
are avilable at:
https://sourceforge.net/projects/ffnet
Notes
ffnet was created "in the hope that it will be useful". If you find it really is
and you are going to publish some ffnet generated results, please cite it:
\bibitem[FFNET, 2007]{FFNET} Wojciechowski, M.,
Feed-forward neural network for python,
Technical University of Lodz (Poland),
Department of Civil Engineering, Architecture and Environmental Engineering,
http://ffnet.sourceforge.net/, ffnet-0.6, March 2007
Last modified: 24/10/2007