Regression Learner - Neural Network results not reproducible
1 次查看(过去 30 天)
显示 更早的评论
I am looking for help to set the random seed to get reproducible results while using the Matlab Online version for Apps - Regression Learner - All Neural Networks models.
Thanks in advance.
2 个评论
Christopher McCausland
2023-12-2
Hi Hussain,
Once you have an idea of the module generated with the regression learner app, you can export the code with the "Export model" button.
In order to set a repeateable seed, you can use the rng() fucntion at the start of your exported code.
rng('default') %% Or give a seed of you choice
Hope this helps,
Christopher
采纳的回答
Image Analyst
2023-12-3
When you export the model "trainedModel" to the workspace, you then have to save it in a .mat file so that you can recall it for use later in your program:
In the command window:
save('trainedModel.mat', 'trainedModel');
Then in your code where you want to use the model, you use load to recall the model from the mat file on disk
s = load('trainedModel.mat');
trainedModel = s.trainedModel;
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Gaussian Process Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!