MATLAB Answers

NARNET - Qualitative Data & Time Prediction

6 ビュー (過去 30 日間)
Tommaso Belluzzo
Tommaso Belluzzo 2017 年 3 月 12 日
回答済み: Greg Heath 2017 年 3 月 13 日
I have the following dataset:
734483 'Sweden'
734484 'England'
734487 'Italy'
734490 'USA'
734495 'Russia'
734514 'France'
734518 'USA'
734527 'Russia'
734536 'USA'
734548 'Italy'
... ... 5843 observations
The first column represents the date (datenum) on which a specific event happened. The second column represents the country in which the event took place.
I would like to use NARNET to predict future events N steps ahead. This is the code I wrote:
steps = 500;
net = narnet(1:4,10);
net.divideFcn = 'divideblock';
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
net.trainParam.showWindow = false;
data = tonndata(data,false,false);
[X,Xi,Ai,Ts] = preparets(net,{},{},data);
[net,tr] = train(net,X,Ts,Xi,Ai);
netc = closeloop(net);
[Xc,Xic,Aic,Tc] = preparets(netc,{},{},data);
outputc = netc(cell(0,steps),Xic,Aic);
The countries pool is limited. This means that the event can only happen in the countries in which it already happened before. The problem is that it's a qualitative variable and I don't know how to transform it before passing it to the model (and, eventually transform the results back to show up as countries). The second concern dates... how can interpret the model results as future dates?
Thanks!

  0 件のコメント

サインインしてコメントする。

採用された回答

Greg Heath
Greg Heath 2017 年 3 月 13 日
Is this 1 type of event that occurs in all of the countries?
Separate the series for each country.
Obtain the auto and crosscorrelation functions.
Estimate the significant lags of the auto and cross correlations
Use the significant correlations to predict future occurrences.
Search the NEWSGROUP and ANSWERS using
greg significant correlations
greg significant lags
Hope this helps
Thank you for formally accepting my answer
Greg

  0 件のコメント

サインインしてコメントする。

その他の回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by