ANN_SIM — Function to simulate the outputs of a feed-forward artificial neural network with one hidden layer
[OUT,[IN_W,HID_OUT]] = ANN_SIM(IN,Nhid,Nout,W)
Input data (matrix [PxN] where P is the number of input neurons and N the number of input patterns)
Number of neurons in the hidden layer
Number of neurons in the ouput layer
Weight and bias values (2 dimensions Matrix [max(Nhid,M) x max(P+1,Nhid+1) x 2]).
Wini(1:Nhid,1,1) are the bias for the hidden neurons
Wini(1:Nhid,2:P+1,1) are the weights for the hidden neurons (P weights for each hidden neuron)
Wini(1:M,1,2) are the bias for the ouput neurons
Wini(1:M,2:Nhid+1,2) are the weights for the ouput neurons (Nhid weights for each output neuron)
Network outputs (Matrix [NoutxN])
Weighted input from the input layer (matrix [Nhid x N])
Outputs from the hidden layer (matrix [Nhid x N])
The activation function of the hidden layer is the hyperbolic tangent and the identity function for the output layer.
Note : weighted output from the hidden layer is equal to HID_OUT because of the identity activation function
Add here a paragraph of the function description
// Ouput from a network with 6 input nodes, 4 nodes in the hidden layer and 1 output node IN = rand(6,100); W = rand(4,7,2); [OUT,IN_W,HID_OUT] = ANN_SIM(IN,4,1,W)