bayesopt options pair: 'InitialX', {1x6} results in first cell-array entry taken as initial for all variables
2 views (last 30 days)
Show older comments
Hi there,
I'm using bayesopt as follows:
results = bayesopt(fun, [aa1,aa2,aa3,aa4,aa5,aa6], 'AcquisitionFunctionName', 'expected-improvement-plus','IsObjectiveDeterministic',true, 'MaxObjectiveEvaluations', 30, 'InitialX', {0.4 0.3 0.5 0.3 0.6 0.2})
which is resulting in all my variables being initialized with 0.4, instead of the full cell-array given.
0 Comments
Accepted Answer
Don Mathis
on 5 Jul 2017
Edited: Don Mathis
on 5 Jul 2017
Thanks for pointing this out. That's a bug, because bayesopt should not accept a cell array as the value for 'InitialX'. It expects a table. Internally, it accesses the cell array as though it were a table, and the result is wrong, as you noticed.
An easy fix is to pass a table instead of a cell array, like this:
'InitialX', cell2table({0.4 0.3 0.5 0.3 0.6 0.2})
0 Comments
More Answers (0)
See Also
Categories
Find more on Model Building and Assessment in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!