用小波神经网络来对时间序列进行预测

更新时间:2023-06-14 21:43:17 阅读: 评论:0

/* Note:Your choice is C IDE */
#include "stdio.h"
void main()
{
   
}/*用小波神经网络来对时间序列进行预测 */
/*%File name :      nprogram.m 
%Description  :  This  file  reads  the  data  from   
%its  source  into  their  respective  matrices  prior  to 
% performing wavelet decomposition. 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%Clear command screen and variables  */
clc; 
clear; 
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
% ur desired resolution level (Tested: resolution = 2 is best)*/ 
level = menu('Enter desired resolution level: ', '1',... 
                  '2 (Select this for testing)', '3', '4'); 
switch level 
      ca4级成绩 1, resolution = 1; 
      ca 2, resolution = 2; 
      ca 3, resolution = 3; 
      ca 4, resolution = 4; 
end 
msg = ['Resolution level to be ud is ', num2str(resolution)]; 
disp(msg); 
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
% ur desired amount of data to u  */
data = menu('Choo amount of data to u: ', '1 day', '2 days', '3 days', '4 days',... 
                '5 days', '6 days', '1 week (Select this for testing)'); 
switch data 
      ca 1, dataPoints = 48;        /*%1 day = 48 points  */
      ca 2, dataPoints = 96;      /* %2 days = 96 points  */
      ca 3, dataPoints = 144;      /*%3 days = 144 points */
      ca 4, dataPoints = 192;      /*%4 days = 192 points */
      ca 5, dataPoints = 240;      /* %5 days = 240 points  */
      ca 6, dataPoints = 288;      /* %6 days = 288 points  */
      ca 7, dataPoints = 336;      /*%1 weeks = 336 points */
end 
msg = ['No. of data points to be ud is ', num2str(dataPoints)]; 
disp(msg); 
meantodo
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%Menu for data t lection  */
lect =谦受益满招损英语翻译 menu('U QLD data of: ', 'Jan02',... 
                    'Feb02', 'Mar02 (Select this for testing)', 'Apr02', 'May02'); 
switch lect 
      ca 1, demandFile = 'DATA200601_QLD1';
      ca 2, demandFile = 'DATA200602_QLD1'
      ca 3, demandFile = 'DATA200603_QLD1'
      ca 4, demandFile = 'DATA200604_QLD1'
      ca 5, demandFile = 'DATA200605_QLD1'
end 
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%Reading the historical DEMAND data into tDemandArray */
lectedDemandFile=[demandFile,'.csv'];
[regionArray, sDateArray, tDemandArray, rrpArray, pTypeArray] ... 
= textread(lectedDemandFile, '%s %q %f %f %s', 'headerlines', 1, 'delimiter', ','); 
26个英文字母大小写表
/*%Display no. of points in the lected time ries demand data  */
[demandDataPoints, y] = size(tDemandArray); 
msg = ['The no. of points in the lected Demand data is ', num2str(demandDataPoints)]; 
disp(msg); 
/*%Decompo historical demand data signal  */
[dD, l] = swtmat(tDemandArray, resolution, 'db2'); 
approx = dD(resolution, :); 
/*%Plot the original demand data signal  */
figure (1); 
subplot(resolution + 2, 1, 1); plot(tDemandArray(1: dataPoints)) 
商务英语口语王legend('Demand original'); 
title('QLD Demand Data Signal'); 
/*%Plot the approximation demand data signal  */
for i = 1 : resolution 
      subplot(resolution + 2, 1, i    + 1); plot(approx(1: dataPoints)) 
      legend('Demand Approximation'); 
end 
/*%After displaying approximation signal, display detail x  */
for i = 1: resolution 
    if( i > 1 ) 
            detail(i, :) = dD(i-1, :)- dD(i, :); 
      学习外语的网站el 
            detail(i, :) = tDemandArray' - dD(1, :); 
      end 
xiaofan
          if i ==
                subplot(resolution + 2, 1, resolution - i + 3); plot(detail(i, 1: dataPoints)) 
                legendName = ['Demand Detail ', num2str(i)]; 
                  legend(legendName); 
            el 
                subplot(resolution + 2, 1, resolution - i +indicate 3); plot(detail(i, 1: dataPoints)) 
                legendName = ['Demand Detail '北大青鸟培训课程, num2str(i)]; 
                legend(legendName); 
            end 
    i = i + 1; 
end 
/*%Normalising approximation demand data  */
maxDemand = max(approx'); %Find largest component  emperor怎么读
normDemand = approx ./ maxDemand; /*%Right divison  */
maxDemandDetail = [ ]; 
normDemandDetail = [, ]; 
detail = detail + 4000; 
for i = 1: resolution 

本文发布于:2023-06-14 21:43:17,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/145219.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:时间   序列   青鸟   网站   课程   学习外语
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图