资源简介
文件列表:
NN_FEX
......\Description_of_NN.pdf
......\Example_Data.mat
......\Example_Script_NN.m
......\m_Files
......\.......\nn.m
......\.......\nn_core.m
......\.......\snn.m
......\.......\snn_core.m
代码片段和文件信息
% Example script for NN
% This script will model a time series using the two different methods
% and then plot the forecasts versus real points
addpath(‘m_Files‘);
load Example_Data.mat;
x=Ibov; % Load data from .mat file
d=1000; % Defines where to start the forecasts
m=3; % Size of histories (embeding dimension)
k=20; % Number of nearest neighbors to use in the forecast‘s calculation
method_1=‘correlation‘;
method_2=‘absolute_distance‘;
[OutSample_For_CorrInSample_For_CorrInSample_Res_Corr]=nn(xdmkmethod_1);
[OutSample_For_AbsInSample_For_AbsInSample_Res_Abs]=nn(xdmkmethod_2);
plot([x(d+1:end)InSample_For_CorrInSample_For_Abs]);
xlabel(‘Time‘);
ylabel(‘Values‘);
title([‘Forecasts VS Real values (m=‘num2str(m)‘ k=‘num2str(k)‘ d=‘num2str(d)‘)‘]);
legend(‘Ibov Real Series‘‘NN forecast with correlation Method‘‘NN forecast with abs distance Method‘);
rmpath(‘m_Files‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2007-09-20 16:24 NN_FEX\
文件 113247 2007-01-15 16:11 NN_FEX\Desc
文件 2672 2007-09-20 15:39 NN_FEX\Example_Data.mat
文件 967 2007-09-20 16:25 NN_FEX\Example_sc
目录 0 2007-09-20 16:26 NN_FEX\m_Files\
文件 4423 2007-09-20 16:20 NN_FEX\m_Files\nn.m
文件 2190 2007-01-15 15:33 NN_FEX\m_Files\nn_core.m
文件 3984 2006-11-27 20:04 NN_FEX\m_Files\snn.m
文件 1648 2006-11-27 19:59 NN_FEX\m_Files\snn_core.m
- 上一篇:信号检测贝叶斯
- 下一篇:基于三层BP神经网络的股票数据预测模型
评论
共有 条评论