Validation of the prediction model with observed (new ) dataset

1 vue (au cours des 30 derniers jours)
Athira t
Athira t le 1 Juil 2020
Modifié(e) : Shubham Rawat le 24 Juil 2020
I have written a code in LSTM for prediction. The code is attached below. The predicted the values are matching with YTest dataset with an R squared value of 0.923. so doubt is that how can I validate this model with a new observed values. thanks in advance.
%%define LSTM architecture
inputSize = 8;
numResponses = 1;
numHiddenUnits = 100;
layers = [sequenceInputLayer(inputSize)
lstmLayer(numHiddenUnits)
fullyConnectedLayer(numResponses)
regressionLayer];
opts = trainingOptions('adam', ...
'MaxEpochs',500, ...
'GradientThreshold',1, ...
'InitialLearnRate',0.005, ...
'LearnRateSchedule','piecewise', ...
'LearnRateDropPeriod',125, ...
'LearnRateDropFactor',0.2, ...
'Verbose',0, ...
'Plots','training-progress');
net= trainNetwork(XTrain,YTrain,layers,opts);
%%predict
Ypred1= predict(net,XTest);

Réponses (1)

Shubham Rawat
Shubham Rawat le 24 Juil 2020
Modifié(e) : Shubham Rawat le 24 Juil 2020
Hi Athira,
You can use ‘validation data’ options with LSTM networks. But this option is available from R2018b.

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by