It is my first time with neural network Kohonen.
이전 댓글 표시
I try predict time series price copper with neural network Kohonen. In file testsom.m is erroron wzor=[wzor,predc]( The following error occurred converting from double to struct: Error using struct Conversion to struct from double is not posiible.
function result=testsom(szereg,pocz,p,ile)
%p = 10; %pocz = 1140; kon = pocz+p*ile; wy = []; good = []; bladd = 0; bladg = 0; cp = 8;
sp = 10; sk = 5;
rozxx = 5; rozxy = 5; rozxy = 5; rozyy = 5; wylicz = szereg(1:pocz);
for ii=pocz:p:(kon-p)
wzor = szereg(1:ii);
model = start(wzor,sk,sp,rozxx,rozxy,rozxy,rozyy);
od = ii;
do = ii + p;
for i=od:do-1
w = odp(model,wzor(i-sp+1:i-1),1,wzor(i-1)); % predykcja wartosci szereg(i)
predc = w; % nowa wyliczona wartosc szeregu czasowego
wzor = [wzor , predc];
wylicz = [wylicz, predc];
end
end
% liczenie bledu
srednia = mean(szereg(1:kon)); for i=pocz:kon bladg =bladg + abs(wylicz(i) - szereg(i)); bladd = bladd + abs(szereg(i)- srednia); end
blad = bladg/bladd;
plot(wylicz,'r'); hold on; plot(szereg);
result = blad;
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!