The NeuralNetGen04.lng Model

Neural Network training in LINGO

View the model
Download the model

Neural Network training in LINGO (NeuralNetGen.lng)
We want to predict the (binary) outcome ( -1 or + 1)
for a each of a set of observations.
We use a neural network with 4 layers.
Layer 0 is the input layer, consisting of, in this case 5 nodes,
i.e., the features that are observed for each observation.
Layers 1 and 2 are the hidden layers.
Layer 3 is the output or prediction layer. It has just one node
that should have an output of either +1 or -1, depending on the observation.
The key idea is that each node at level v, computes an input
X = a weighted average of the outputs of the nodes at level v-1, and
then converts this to
Y = a sigmoid function of X, an output in [-1, +1].

The key variables are:
BETAvX( j, k)) = weight applied to output from node j at level v-1
in computing the input to node k at level v,
BETAvC( k, v) = constant term in computing input to node k, level v;

Keywords:

Forecasting | Machine learning | Neural network | ML | ANN | Artificial neural network |