gpt4 book ai didi

MATLAB 优化 : objective function with "steps"

转载 作者:行者123 更新时间:2023-12-04 18:05:48 25 4
gpt4 key购买 nike

我试图在 MATLAB 中使用 fmincon 找到最小值,但我面临以下问题:

优化完成,因为初始点的梯度大小小于函数公差的默认值。

我的目标函数的表面显示“台阶”,因此它在输入变量的特定范围内具有相同的值(如果我是正确的,梯度的大小为零):

enter image description here

当从初始点移动时,求解器看不到目标函数值的任何变化,并完成优化:

Iteration  Func-count       f(x)        Step-size       optimality

0 3 581.542 0

Initial point is a local minimum.

Optimization completed because the size of the gradient at the initial point
is less than the default value of the function tolerance.

在目标函数保持其值不变(直到目标函数开始增加)的情况下,有什么办法可以使求解器向前移动?

感谢您的帮助。

最佳答案

我将我的扩展评论作为答案发布,希望 future 的答案寻求者能够更轻松地找到解决方案:

使用非基于梯度的求解器可能会得到合理的结果,例如ga ,如果目标函数的评估成本不高。这些不依赖于梯度并且在非平滑函数上表现良好。在选择求解器算法之前,还值得阅读以下指南:How to choose solver .

关于MATLAB 优化 : objective function with "steps",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26907581/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com