Different Bayes Optimization Results

1 回表示 (過去 30 日間)
MByk
MByk 2019 年 2 月 7 日
編集済み: MByk 2019 年 4 月 2 日
Sorry if it is a dumb question but is it normal to get different values despite using the same seed value? Or Am I making a mistake? I am using rng(1234,'twister') as seed value and Bayesian optimization in parallel. Thanks for the help.
  1 件のコメント
John D'Errico
John D'Errico 2019 年 2 月 7 日
Hard to tell without seeing sufficient code. Probable user error. :)
Using rng as you did will reset the seed. Thus we see:
rng(1234,'twister')
>> rand
ans =
0.19152
>> rand
ans =
0.62211
>> rng(1234,'twister')
>> rand
ans =
0.19152
So when I use rng again, the sequence repeats. Perhaps you are doing something along the line to interrupt that sequence, thus perhaps a rng('shuffle") is done somewhere, perhaps by some other code you are using, even something you may have downloaded. As I said, hard to know.

サインインしてコメントする。

採用された回答

Alan Weiss
Alan Weiss 2019 年 2 月 7 日
Sorry, it is not clearly documented, but when running Bayesian optimization in parallel, results are not reproducible. You can see this from the Parallel Bayesian Algorithm description, where it discusses what happens if too many workers are idle. The algorithm can perform differently depending on the state of the workers, so is not reproducible.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 件のコメント
MByk
MByk 2019 年 2 月 7 日
Thanks for the answer sir. So nothing wrong with the code but for reproducibility I must shut down the parallel pool.
John D'Errico
John D'Errico 2019 年 2 月 7 日
So even in MATLAB, idle workers are a problem. ;-)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModel Building and Assessment についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by