NARNET - Qualitative Data & Time Prediction
古いコメントを表示
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 件)
カテゴリ
ヘルプ センター および File Exchange で Linear Predictive Coding についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!