Make Bayesian Optimization (bayesopt) model positive

조회 수: 2 (최근 30일)
N/A
N/A 2017년 11월 10일
편집: N/A 2021년 4월 21일
I am using bayesopt to minimize a function which can only give positive results. However, when bayesopt finishes it gives a best objective function estimate which is negative. Is there a way to enforce objective function model to be positive? I have tried coupled constraints and it didn't seem to work. Thanks

채택된 답변

Alan Weiss
Alan Weiss 2017년 11월 10일
If I understand you correctly, your objective function is stochastic, but always returns positive values.
If that is true, then I suggest that you optimize the log of the objective function, and take exp(answer) as the value.
If your objective function is not stochastic, then I suggest that you set the 'IsObjectiveDeterministic' name-value pair to true and see if that fixes things.
Alan Weiss
MATLAB mathematical toolbox documentation

추가 답변 (1개)

Don Mathis
Don Mathis 2017년 11월 10일
Just to add to Alan's answer, bayesopt uses a Gaussian Process model to model the objective function, and Gaussian processes are inherently unbounded: The posterior distribution over Y at a given X is a Gaussian distribution. Often you can use this effectively for bounded functions (e.g., if your function value never gets close to zero), but if you want to be rigorous, you should transform your objective function into one which is unbounded. Optimizing log(y) is one way.

카테고리

Help CenterFile Exchange에서 Model Building and Assessment에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by