【问题标题】:Stopping criteria for fminsearch in MatlabMatlab中fminsearch的停止条件
【发布时间】:2019-01-01 01:29:59
【问题描述】:

我正在使用 fminsearch 将 DE 系统的参数拟合到观察到的数据。我不希望得到一个很好的适合。

fminsearch 很快找到目标函数可接受的最小值,但并没有停止。它运行了很长时间,我不知道为什么。

我正在使用选项

options = optimset('Display','iter','TolFun',1e-4,'TolX',1e-4,'MaxFunEvals',1000);

我理解的意思是当目标函数的值下降到低于 1e-4 时,这将被认为是足够的。或者,当他们无法再更改参数时,将返回最好的参数。

输出是

Iteration   Func-count     min f(x)         Procedure
 0            1      8.13911e+10         
 1            8       7.2565e+10         initial simplex
 2            9       7.2565e+10         reflect
 3           10       7.2565e+10         reflect
 4           11       7.2565e+10         reflect
 5           12       7.2565e+10         reflect
 6           13       7.2565e+10         reflect
 7           15      6.85149e+10         expand
 8           16      6.85149e+10         reflect
 9           17      6.85149e+10         reflect
10           19      6.20681e+10         expand
11           20      6.20681e+10         reflect
12           22      5.55199e+10         expand
13           23      5.55199e+10         reflect
14           25      4.86494e+10         expand
15           26      4.86494e+10         reflect
16           27      4.86494e+10         reflect
17           29      3.65616e+10         expand
18           30      3.65616e+10         reflect
19           31      3.65616e+10         reflect
20           33      2.82946e+10         expand
21           34      2.82946e+10         reflect
22           36      2.02985e+10         expand
23           37      2.02985e+10         reflect
24           39      1.20011e+10         expand
25           40      1.20011e+10         reflect
26           41      1.20011e+10         reflect
27           43      5.61651e+09         expand
28           44      5.61651e+09         reflect
29           45      5.61651e+09         reflect
30           47       2.1041e+09         expand
31           48       2.1041e+09         reflect
32           49       2.1041e+09         reflect
33           51      5.15751e+08         expand
34           52      5.15751e+08         reflect
35           53      5.15751e+08         reflect
36           55      7.99868e-05         expand
37           56      7.99868e-05         reflect
38           58      7.99835e-05         reflect
39           59      7.99835e-05         reflect

我之前让它运行了更长的时间,并且在接下来的 30 次打印输出中,它的最小 f(x) 保持不变。

如何正确设置选项,以便当它在目标函数的可接受值内找到解决方案时停止?

【问题讨论】:

    标签: matlab fminsearch


    【解决方案1】:

    Matlab 要求在终止前同时满足 TolX 和 TolFun(“与其他求解器不同,fminsearch 在同时满足 TolFun 和 TolX 时停止。”参见:https://www.mathworks.com/help/matlab/ref/fminsearch.html)。您应该检查“x”值(您的解决方案)在做什么。我怀疑这比你每一步的公差规格变化更多。 (即 x 的值在迭代之间的变化大于 TolX,但 f(x) 的变化不超过 TolFun)。

    【讨论】:

    • 感谢您的建议 - 很遗憾我无法返回查看此问题,但下次遇到此问题时会知道去哪里查找。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-13
    • 2015-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多