Forecasting Prices with Learning Machine

1 visualizzazione (ultimi 30 giorni)
stelios loizidis
stelios loizidis il 22 Apr 2020
Hello. I am new to Learning machine development. In short, I want to do the following: I have some product prices for 216 and I want to make forecast using learning machine for the prices of this product for the first 3 months of 2017. I created the training and testing set data. Then I traned the network. But I have not been able to forecast. I used command forecast but makes an error.
Below I have the code I wrote for creating the training and testing set data. Tour help is invaluable!!!
t=linespace(-5,5,length(PriceData2016));
trials=20;
neurals=20;
for i=1:trials
%Training Data
samples=1
DataPrices=length(PriceData2016);
TrainxData=t(ones(1,samples),:)';
TrainingyData=sinc(TrainxData'/pi)+(-0.2 +0.4*rand(samples,Dataprices2013));
%Testing Data
TestingxData=t;
TestingyData=h*bet;
end
%train network
train=false;
if train || ~ exist('Model.mat','file')
net=mewfit(TrainingxData',TrainingyData',20);
net.perform='mae';
net=train(net, TrainigxData',TrainingyData');
save Model.mat net
elese
load Model. mat
end
%Price forecasting
forecastPrice2017=forecast(net,length(PriceData2016),'Y0',TestingxData)
error: undefiined function 'forecast' for input arguments of type network.
For the forecasting I tried the following command but it did not work.
forecastinPrice2017=sim(sim,TetingxData');
error:Input data sizes do not match net.input{1}.size
sizes of matrix:
TrainingxData: 250X1
TrainingyData: 1X250
TestingxData: 1X250
TestingyData: 1X250

Risposte (0)

Categorie

Scopri di più su Financial Data Analytics in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by