mlp
train a multilayer perceptron with backprop
mlp -help
or
mlp [-dfile string] [-steps integer] [-seed integer]
[-freq integer] [-numin integer] [-numhid integer]
[-numout integer] [-lrate double] [-mrate double]
[-winit double] [-linout] [-pdump] [-gdump]
Trains a multilayer perceptron with a single hidden layer of neurons on a set of data contained in a file using the backpropagation learning algorithm with momentum. Output units can be linear or sigmoidal, allowing you to model both discrete and continuous output target values.
Train a multilayer perceptron with a single hidden layer of neurons on a set of data contained in a file using the backpropagation learning algorithm with momentum. Output units can be linear or sigmoidal, allowing you to model both discrete and continuous output target values.
Miscellany
The number of inputs and outputs must agree with the format of your training data file. The program expects to find training patterns listed one after another with each training pattern consisting of the inputs followed by the target outputs.
If the -pdump switch is used, then the patterns will printed to stdout. Hence,redirect this to a file if you want to save it.
You should always use linear outputs if your target values are continuous.
The error value displayed via stderr is the root mean squared error taken over the entire data step. Calculating this error measure is typically far more expensive than a single training step, so you may wish to use the -freq option to make it happen less frequently.
If you network doesn't converge to anything useful, try increasing the number of hidden nodes. Moreover, you may need to tweak the learning rate and momentum term. This is just one of the curses of backprop.
Bugs
The -gplot switch isn't very useful as it only works on the first output neuron.
No sanity checks are performed to make sure that any of the options make sense.
Options
-dfile | Training data file. | data/xor.dat |
-steps | Number of simulated steps. | 2000 |
-seed | Random seed for initial state. | 0 |
-freq | Status print frequency. | 1 |
-numin | Number of inputs. | 2 |
-numhid | Number of hidden nodes. | 2 |
-numout | Number of outputs. | 1 |
-lrate | Learning rate. | 0.25 |
-mrate | Momentum rate. | 0.5 |
-winit | Weight init factor | 0.1 |
-linout | Use linear outputs? | False |
-pdump | Dump patterns at end of run? | False |
-gdump | Dump gnuplot commands at end? | False |