It is possible to create a dynamic model using radial basis function in the matlab tool box?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to create a net that uses radial basis function in a NARX model: inputs contain delays and feed back. Something like this http://fr.mathworks.com/help/nnet/ug/design-time-series-narx-feedback-neural-networks.html but using a radial basis function.
0 commentaires
Réponse acceptée
Greg Heath
le 23 Nov 2014
close all, clear all, clc, plt=0
[ X, T ] = simpleseries_dataset ;
net = narxnet(0:1,[],1);
net.layers{1}.transferFcn = 'radbas';
net.divideFcn = 'divideblock';
[Xs,Xi,Ai,Ts] = preparets(net,X,{},T);
xs = cell2mat(Xs);
ts = cell2mat(Ts);
plt = plt+1, figure(plt)
hold on
plot(xs(1,:),'LineWidth',2)
plot(ts,'r')
MSE00s = mean(var(ts,1))
net.trainParam.goal = 0.01*MSE00s;
Ntrials = 10
rng('default')
for i= 1:Ntrials
net = configure(net,Xs,Ts);
[ net tr Ys Es Xf Af] = train(net,Xs,Ts,Xi,Ai);
R2s(i) = 1-mse(Es)/MSE00s;
end
plt = plt+1, figure(plt)
hold on
plot(ts,'LineWidth',2)
plot(cell2mat(Ys),'r--')
R2s = R2s
% R2s = [ 0.99548 0.99556 0.99997 0.99813 0.99528 % 0.99528 0.99973 0.99534 0.9925 0.99085 ]
Hope this helps
Thank you for formally accepting my answer
Greg
Plus de réponses (2)
Greg Heath
le 20 Nov 2014
Unfortunately, there are no options in the NNTBX that will yield this.
Either modify MATLAB functions or find non-MATLAB code.
3 commentaires
Greg Heath
le 22 Nov 2014
When I wrote that I didn't think it out because I didn't think you would seriously consider doing that rather than just use the MLP version.
You would probably have to transfer the open loop weights and transfer functions to a timeseries function.
You could try to use radbas in a time series function. However, I'm not sure what would happen.
Nevertheless, since it is fast and easy, I would try it 1st just to see what happens.
I recall using radbas in one or more newff designs. You might want to search in NEWSGROUP or comp.ai.neural-nets.
Edna Plazas García
le 12 Mar 2015
Hi Greg Heath
I've been looking at your code and it seems very good, but I have two question, the firts I have some data from a plant already taken, how do I call this code and serve this code with that data? attached a .mat with the data(are 2001 data), the first row is U and the second row is Y. the second is how do I validate data elsewhere in this simulation? as I use the function sim ?. Thanks you.
Edna Plazas García
le 11 Mar 2015
Hi Greg Heath
I've been looking at your code and it seems very good, but I have a question, I have some data from a plant already taken, how do I call this code and serve this code with that data? attached a .txt with the data(are 2001 data), the first row is U and the second row is Y.
1 commentaire
Greg Heath
le 15 Mar 2015
Modifié(e) : Greg Heath
le 15 Mar 2015
The attachment is missing. Either try again or email it to me *.txt or *.m.
U = input, Y = target ?
[ Ys Xf Af] = net(Xs,Ts,Xi,Ai);
Voir également
Catégories
En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!