Forecasting Prices with Learning Machine

2 ビュー (過去 30 日間)
stelios loizidis
stelios loizidis 2020 年 4 月 22 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence 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