MATLAB: Improvement of the neural net fitting app

deep learningneural network

Hello, I am using the neural net fitting app as I am trying to solve a fitting problem. I am using a multi-hidden layers net (6 inputs, 5 outputs). Each layers has 20 neurons (7 layers). The training algorythm is trainlm. I am not able to improve the performance (mse) as it will not go under 0.7. Any suggestions on how to solve this? I have tried changing the activation function of the layers and also the training algorythm (trainbr and trainscg) but I cannot get better results.

Best Answer

Poor neural network performance might be because the error is not able to reach the goal. If this occurs then you can try the following:
1) Raise the error goal of the training function. While it seems that the lowest error goal is best, it can cause invalid training as well as hinder network generalization. For example, if you are using the trainlm function, the default error is 0. You may want to set the error to 1e-6 in order to make the network capable of reaching the error goal.
[x,t] = simplefit_dataset;
net = feedforwardnet(10);
net.trainParam.goal=1e-6
2) You may want to use a different performance function. The default performance function is MSE (the mean squared error). For example, try SSE (Sum squared error performance function):
net.performFcn = 'sse';
However, the more a network is generalized the more difficult it is to achieve the lowest error. Therefore you may want to consider sacrificing some generalization and improving network performance by raising the performance ratio which lies in the range [0 1]. For more information on improving network generalization, you can refer to the following link:
3) You may want to increase the number of epochs for training in some situations. This will take a longer time to train the network but may yield more accurate results. To set the number of epochs see the following example which is an extension to the one above:
net.trainParam.epochs=1000;
Hope this helps!