
neurolab
NeuroLab
Neurolab is a simple and powerful Neural Network Library for Python. Contains based neural networks, train algorithms and flexible framework to create and explore other networks
Develop
Develop process migrate to GitHub:
Features
- Pure python + numpy
- API like Neural Network Toolbox (NNT) from MATLAB
- Interface to use train algorithms form scipy.optimize
- Flexible network configurations and learning algorithms. You may change: train, error, initializetion and activation functions
- Variety of supported types of Artificial Neural Network and learning algorithms
- Python 3 support https://www.paypal.com/cgi-bin/webscr?hosted_button_id=HRF5T66LM4L7G&cmd=_s-xclick https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif] '>
Example
```
import numpy as np import neurolab as nl
Create train samples
input = np.random.uniform(-0.5, 0.5, (10, 2)) target = (input[:, 0] + input[:, 1]).reshape(10, 1)
Create network with 2 inputs, 5 neurons in input layer and 1 in output layer
net = nl.net.newff([[-0.5, 0.5], [-0.5, 0.5]], [5, 1])
Train process
err = net.train(input, target, show=15) Epoch: 15; Error: 0.150308402918; Epoch: 30; Error: 0.072265865089; Epoch: 45; Error: 0.016931355131; The goal of learning is reached
Test
net.sim([[0.2, 0.1]]) # 0.2 + 0.1 array([[ 0.28757596]]) ```
Install
Install neurolab using setuptools/distribute:
easy_install neurolab
Or pip:
pip install neurolab
Or, if you don't have setuptools/distribute installed, use the download link at right to download the source package, and install it in the normal fashion: Unzip the source package, cd to the new directory, and:
python setup.py install
Support neural networks types
Single layer perceptron
- create function: neurolab.net.newp()
- example of use: newp
- default train function: neurolab.train.train_delta()
- support train functions: train_gd, train_gda, train_gdm, train_gdx, train_rprop, train_bfgs, train_cg
Multilayer feed forward perceptron
- create function: neurolab.net.newff()
- example of use: newff
- default train function: neurolab.train.train_gdx()
- support train functions: train_gd, train_gda, train_gdm, train_rprop, train_bfgs, train_cg
Competing layer (Kohonen Layer)
- create function: neurolab.net.newc()
- example of use: newc
- default train function: neurolab.train.train_cwta()
- support train functions: train_wta
Learning Vector Quantization (LVQ)
- create function: neurolab.net.newlvq()
- example of use: newlvq
- default train function: neurolab.train.train_lvq()
Elman Recurrent network
- create function: neurolab.net.newelm()
- example of use: newelm
- default train function: neurolab.train.train_gdx()
- support train functions: train_gd, train_gda, train_gdm, train_rprop, train_bfgs, train_cg
Hopfield Recurrent network
- create function: neurolab.net.newhop()
- example of use: newhop
Hemming Recurrent network
- create function: neurolab.net.newhem()
- example of use: newhem
Project Information
The project was created on Feb 24, 2011.
- License: GNU Lesser GPL
- 107 stars
- svn-based source control
Labels:
neural-network
python
neural-network-toolbox
numpy
scipy
Machinelearning
feedforward
lvq
perceptron
Kohonen
Elman
Hopfield
Hemming