It is possible to create a dynamic model using radial basis function in the matlab tool box?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Greg Heath
2014-11-23
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
更多回答(2 个)
Greg Heath
2014-11-20
Unfortunately, there are no options in the NNTBX that will yield this.
Either modify MATLAB functions or find non-MATLAB code.
3 个评论
Greg Heath
2014-11-22
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
2015-3-12
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
2015-3-11
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 个评论
Greg Heath
2015-3-15
编辑:Greg Heath
2015-3-15
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);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!