Regression Learner - Neural Network results not reproducible
조회 수: 4 (최근 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개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!