Nonlinear regression with neural network
Show older comments
I would like to share with you how I approached a nonlinear regression problem (2 inputs, one output), and have your advice.
After some quick readings I settled for a network with one single hidden layer with the tansig transfer function and purelin for the output, as it seems to be the most common approach for such problems.
I used trainbr in order to automatically determine the regularization parameter. However, I didn't find out how to automatically determine the number of hidden neurons (which should normally be possible in the Bayesian framework if I'm not msitaken). So I couldn't conflate the training and validation sets ; I kept the validation set to evaluate architectures of increasing amounts of neurons.
So within one for loop going from 1 to 20, I trained networks with 1 to 20 neurons in the hidden layer. Then, I applied them on the validation set and computed the mean squared error.
First question : is this the most appropriate way to do? Would you have done differently?
The MSE keeps getting smaller as the number of neurons increase. I stopped at 20 as there seems to have no real benefits in going further. Then, I applied the 2-20-1 net to the test set, and got a very very small MSE of 4e^-6, and a correlation of 0.99999 between the test labels and the output of the network.
Second question : isn't it suspicious to get such a high performance? What do you think about this?
I'll be looking forward to your responses in order to validate or dismiss my approach.
Accepted Answer
More Answers (0)
Categories
Find more on Function Approximation and Clustering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!