필터 지우기
필터 지우기

Regression Learner - Neural Network results not reproducible

조회 수: 4 (최근 30일)
Hussain Ali
Hussain Ali 2023년 12월 2일
댓글: Hussain Ali 2023년 12월 3일
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
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
Hussain Ali
Hussain Ali 2023년 12월 3일
Thanks Chrsitopher for the timely support. When I export model, it stores as trainedmodel in workspace as '1x1 struct'. I am unable to locate the code, if you could help me.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
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!

Translated by