NARNET - Qualitative Data & Time Prediction

3 次查看(过去 30 天)
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!

采纳的回答

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 个)

类别

Help CenterFile 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!

Translated by