It is possible to create a dynamic model using radial basis function in the matlab tool box?

1 visualización (últimos 30 días)
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.

Respuesta aceptada

Greg Heath
Greg Heath el 23 de Nov. de 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

Más respuestas (2)

Greg Heath
Greg Heath el 20 de Nov. de 2014
Unfortunately, there are no options in the NNTBX that will yield this.
Either modify MATLAB functions or find non-MATLAB code.
  3 comentarios
Greg Heath
Greg Heath el 22 de Nov. de 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
Edna Plazas García el 12 de Mzo. de 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.

Iniciar sesión para comentar.


Edna Plazas García
Edna Plazas García el 11 de Mzo. de 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 comentario
Greg Heath
Greg Heath el 15 de Mzo. de 2015
Editada: Greg Heath el 15 de Mzo. de 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);

Iniciar sesión para comentar.

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by