> Hi Greg,Thank you so much for your attention. 1- I wanted to fill some data that I missed during measurement by ANN and using some parameters which may impact on my target data. Inputgap are those data(8 parameters) that may be helpful to fill the gap.
Please do not refer to input variables and output variables as parameters. Parameters are entities that stay constant during the process:
outputs = f(inputs,parameters).
> 2- size of my input is 1525 data and size of gap is 666(target).
Still not clear: Apparently I need some physical insight:
What are your inputs, parameters and targets?
size(targets) = [ 1 859]
size(inputs) = [ 8 1525]
==> size(inputs) = [ 8 859] for net training?
size(inputs) = [ 8 666] for estimating missing data?
> 3- I wanted to try several H. I think(I am not sure if it is correct)If I use from 4 to 2n+3 for H (which n is my 8 parameters) would be enough to get the high mse and R-squared .
Not sure where you got that estimate. If the target plot is relatively smooth you will need at least one hidden node for each local extremum.
[ I N ] = size(inputs)
[ O N ]= size(targets)
Ntrn = round(0.7*N)
Ntrneq = Ntrn*O
% No. of unknown weights to estimate for H hidden nodes
Nw = (I+1)*H+(H+1)*O
Ntrneq >= Nw when H <= Hub where
Hub = floor( (Ntrneq-O)/(I+O+1))
>4. since I have 60 artificial gap scenarios to prove that ANN can be a good method to simulate my missing data I need to test R2 and TsetReg. Actually 0.7 was the highest amount that I think might get from ANN.
Correction: if output vs target slope is R = 0.7, then R2 is only 0.49.
If you have to set a goal, try R2 >= 0.995 i.e., mse(error) <= 0.005*var(targets,1) via
net.trainParam.goal = 0.005*var(targets,1)
If the net can't do it your computer will not explode.
First try Ntrials = 10. If need be, you can always design more.
4- Honestly I thought it can give me the answer sooner!! But unfortunetly after running 8 months I could not get a good result for "mse" comparing to linear interpolation!! but r squared was a little bit better in ANN method. my data was for six years (2191 data which has 666 gaps)and because I could get a good result with running all of the data I have decided to use 4 years data for training and 2 years for testing.probably in this way I could get a good result.but unfortunately I don't know how to write the script for introducing one file (4 years)as a training and another file(2 years)as a testing to ANN. Thanks for your help and time.
It is as simple as
savednet = save(net);
loadednet = load(savednet);
newoutput = loadednet(newinput)
Hope this helps
Thank you for fomally accepting my answer