フィルターのクリア

Modifying results from bayesopt

2 ビュー (過去 30 日間)
Alexander
Alexander 2017 年 11 月 9 日
コメント済み: Alexander 2017 年 11 月 13 日
Hey guys, following use case: I call bayesopt and get the results structure from it.
Now, the results structure contains a field, named 'NextPoint'. This is the x vector, which is going to be evaluated after a resuming. Given the fact, I know a better point, which is worth to be calculated next, how to replace the automatic one? A direct try yields
You cannot set the read-only property 'NextPoint' of BayesianOptimization.
error message.
  1 件のコメント
Alexander
Alexander 2017 年 11 月 9 日
To clarify:
1. I already tried to do this from an OutputFcn, with the same error;
2. I even know the function value at the "better point". So, indeed, I have not to recalculate it. I just want to apply some additional knowledge to the results structure of bayesopt, which can be used for continuation.

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

採用された回答

Alan Weiss
Alan Weiss 2017 年 11 月 9 日
In order to do this, I think that you are going to have to do two things:
  • Evaluate the point manually.
  • Start the Bayesian optimization afresh, using the returned points (the ones already evaluated by bayesopt) plus put in your new value and point. Use the 'InitialX' and 'Initial Objective' name-value pairs.
Please let us know if this works for you.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 件のコメント
Alexander
Alexander 2017 年 11 月 10 日
編集済み: Alexander 2017 年 11 月 10 日
Yes, this works. I was not aware, that 'XTrace' and 'ObjectiveTrace' holds the whole history of data, which I can reuse.
However, the result is somewhat disillusioning, as I tried to parallelize both: bayesopt as well as the manual evaluation of additional points, which does not play well together.
But the idea of setting 'InitialX' and 'InitialObjective' and restarting bayesopt works.
Thanks a lot :)
Alexander
Alexander 2017 年 11 月 13 日
Ok, after some evaluation, I figured out the unexpected behavior. I attached an example.
Therein: as I understood correctly, what you suggested is the solution in lines 28-35.
However, if I add the ’UseParallel’ option, and provide the 'InitialX‘ array the optimizer does not restart. I didn’t find any documentation on the fact that setting 'InitialX‘ property together with ’UseParallel’ prevent the optimizer to run. Is this a bug?
What I did as a dirty workaround is in lines 25-26. However for being able to set XNext property I had to adjust the access modifier in BayesianOptimization.m to public, in line 1808.
Thanks anyway for help and any further comments.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by