How can I get the predicted YValidation data using LSTM model?

2 次查看(过去 30 天)
Hi, I did a LSTM model, just like the link mentioned(https://ww2.mathworks.cn/help/deeplearning/ref/trainnetwork.html), I specified the ValidationData in the opts.
options = trainingOptions("sgdm", ...
MaxEpochs=8, ...
ValidationData={XValidation,YValidation}, ...
ValidationFrequency=30, ...
Verbose=false, ...
Plots="training-progress");
Because I want draw a picture including the YValidation data(which I specified) and predicted-YValidation data(which derived from the training net), the question is "How can I get the predicted YValidation data"?
Thank you!

回答(1 个)

Krishna
Krishna 2024-6-6
Hi Chen,
I understand that you want to obtain the Yvalidation from the network, the Xvalidation output which you are using for validation. It's quite straightforward, you can use the predict function or classify function to get the output, just like you do with the testing dataset. Since the validation dataset is not used for training, it can be treated as a testing dataset.
Please go through the following documentation to learn more,
Hope this helps.

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by