I have to approximate the function Tnew=(9T1 + 8T2 + 4T3 + 4T4 + 2T5)/27, where T1,T2,T3,T4 and T5 are 13600-by-1 vectors (loaded from a given dataset). All the Ti's are functions of two variables X1 and X2 (X1 and X2 are also loaded from the same dataset). More specifically, I am asked to do the following:
1) Your dataset consists now of X1, X2 and T new. Draw 3 (independent) samples of 1000 points each. Use them as the training set, validation set, and test set, respectively. Motivate the choice of the datasets. Plot the surface of your training set.
2) Build and train your feedforward Neural Network: use the training and validation sets. Build the ANN with 2 inputs and 1 output. Select a suitable model for the problem (number of hidden layers, number of neurons in each hidden layer). Select the learning algorithm and the transfer function that may work best for this problem. Motivate your decisions. When you try different networks, clearly say at the end which one you would select as the best for this problem and why.
This is what I have so far:
plot3(trainset1,trainset2,trainset3), grid on;
title('Surface training set');
alg1 = 'traingd';
H = 50;
delta_epochs = [1,14,985];
epochs = cumsum(delta_epochs);
net1.divideFcn = 'dividetrain';
However, this gives the following error:
Error using network/train (line 340)
Inputs and targets have different numbers of samples.
Error in personnalregression (line 33)
net1=train(net1,z,trainset3); % train the networks
Can anyone help me? Moreover, how do I incorporate the validation set in my program?
Any help would be appreciated!