am i using the results of the neural network fitting tool correctly?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello,
i'm relatively new to nn and am not sure if nftool is the right tool to use for this problem.
i have three time series that are are the inputs to a nonlinear system. in a perfect world, the output of this nonlinear system would be a constant time series. here is my attempt to use a neural network to model this nonlinear system (a representative example with noise):
x=linspace(0,199,200);
inputs(1,:)=exp(-x/100)+exp(-x/10)+randn(1,200)/20; % exponential function
inputs(2,:)=exp(-((x-199)/100).^2)+randn(1,200)/50; % Gaussian function
inputs(3,:)=sin(x/2)+randn(1,200)/10; % sinusoid
target=median(inputs(1,:))*ones(1,200)+randn(1,200)/1000; % constant
net=fitnet(10);
net.inputs{1}.processFcns={'removeconstantrows','mapminmax'};
net.outputs{2}.processFcns={'removeconstantrows','mapminmax'};
net.divideFcn='dividerand';
net.divideMode='sample';
net.divideParam.trainRatio=70/100;
net.divideParam.valRatio=15/100;
net.divideParam.testRatio=15/100;
net.trainFcn='trainlm';
net.performFcn='mse';
[net,tr]=train(net,inputs,target);
output=net(inputs);
the output of this appears to yield a time series similar to the target series within its abilities to make a constant out of the three input time series.
my question comes when i use this trained network on a similar set of inputs, for example if i add a constant to the first input:
inputs(1,:)=inputs(1,:)+10;
output=net(inputs);
i (naively) expected that i would get the same output as before, just shifted by 10 (i.e. what i just added to the first input), however, i get something else altogether.
am i doing something wrong, and/or is there a better way to use neural networks for nonlinear, multidimensional transfer function estimation?
thanks!
0 Commenti
Risposta accettata
Greg Heath
il 8 Ago 2012
The neural network is just a model that characterizes the I/O mapping of the design (train+val) data. If nondesign data doesn't have, approximately, the same summary stats, then don't expect good reslts.
Hope this helps.
Greg
0 Commenti
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!