NARNET - Qualitative Data & Time Prediction

3 visualizaciones (últimos 30 días)
Tommaso Belluzzo
Tommaso Belluzzo el 12 de Mzo. de 2017
Respondida: Greg Heath el 13 de Mzo. de 2017
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!

Respuesta aceptada

Greg Heath
Greg Heath el 13 de Mzo. de 2017
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

Más respuestas (0)

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by