Download Latest Version ffnet-0.8.3.tar.gz (69.1 kB)
Email in envelope

Get an email when there's a new version of Feed-forward neural network for python

Home / ffnet / ffnet-0.7
Name Modified Size InfoDownloads / Week
Parent folder
ffnet-0.7.win32-python2.7.exe 2011-12-17 387.0 kB
README 2011-08-08 3.5 kB
ffnet-0.7.zip 2011-08-08 64.6 kB
ffnet-0.7.tar.gz 2011-08-08 59.5 kB
Totals: 4 Items   514.5 kB 0
This is ffnet-0.7 README file.
Distributed under the terms of the GNU General Public License (GPL)
http://www.gnu.org/copyleft/gpl.html

Copyright (C) 2011 by Marek Wojciechowski
<mwojc@p.lodz.pl>


Overview
--------
ffnet is a fast and easy-to-use feed-forward neural network 
training solution for python. For usage examples
go to http://ffnet.sourceforge.net or browse source distribution of 
the software.


Requirements
------------
ffnet needs at least:
* python-2.6 (or 2.4, 2.5 + multiprocessing package)
* numpy-1.4
* scipy-0.8
* networkx-1.3

For plots (which appear in examples) you'll need also the
matplotlib package (http://matplotlib.sourceforge.net/). 

If you're going to compile ffnet from sources you'll need also 
python header files and C and Fortran 77 compiler.
Installation of those depends on your operating system.


Download
--------
Go to http://ffnet.sourceforge.net to download latest release version
of ffnet. You can also download development version from ffnet
subversion repository (you need subversion installed on your system):

svn co https://ffnet.svn.sourceforge.net/svnroot/ffnet/trunk ffnet

In order to grab the latest development snapshot via your web browser go to
http://ffnet.svn.sourceforge.net/viewvc/ffnet/trunk/
and download the tarball.

Be aware that development versions are not guaranteed to be fully functional.


Installation
------------
For building from sources you can try:

    easy_install ffnet

If this doesn't work for you (for example you don't have setuptools installed)
you can try the options below:

1. Building from source on Linux/Unix.
Unpack ffnet to the directory of your choice, enter this
directory and run as root:

    python setup.py install

ffnet uses numpy.distutils and f2py tool to compile Fortran parts of
the program. The above will work if you are running Linux/Unix system 
with gcc and g77 (gfortran). If you need to use another compiler run:

    f2py -c --help-fcompiler

to see a list of supported compilers.
For example, installing with Intel Fortran Compiler on 32-bit machine
looks like:

    python setup.py install --fcompiler=intel

2. Binary packages for Linux/Unix
You are welcome to produce binary packages for your Linux distribution.

3. Building from source on Windows (32-bit).
If you have mingw compilers installed, run:

    python setup.py build --compiler=mingw32
    python setup.py install --skip-build

4. Binary installers for Windows:
You are welcome to produce binary packages for Windows.


Testing
-------
Installation can be tested with:

    from ffnet._tests import runtest
    runtest()

Execute also ffnet examples. They all should work.


Basic usage
-----------
>>> 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. ] )


Notes
-----
Windows users might be interested in installing Enthought Python Distribution:
http://www.enthought.com/products/getepd.php
which reaches all ffnet requirements and is free for non-commercial use.

It is also very convenient to use ffnet interactively with
ipython, an enhanced python shell. See http://ipython.scipy.org/moin.
Source: README, updated 2011-08-08