Local vs. Global Optima
为什么求解器找不到最小的最小值
In general, solvers return a local minimum (or optimum). The result might be a global minimum (or optimum), but this result is not guaranteed.
一个local函数的最小值是函数值小于附近点的点,但可能比遥远的点大。
一个全球的最小值是函数值小于所有其他可行点的点。
优化工具箱™求解器通常会找到局部最小值。(本地最低限度可以是全球最低限度。)他们在basin of attraction起点。有关吸引盆地的更多信息,请参阅Basins of Attraction。
The following are exceptions to this general rule.
线性编程问题和积极的确定二次编程问题是凸面,具有可行区域,因此它们只有一个吸引人的盆地。根据指定选项,
linprog
ignores any user-supplied starting point, andquadprog
does not require one, even though you can sometimes speed a minimization by supplying a starting point.全局优化工具箱功能,例如
simulannealbnd
,,,,attempt to search more than one basin of attraction.
搜索较小的最低限度
If you need a global minimum, you must find an initial value for your solver in the basin of attraction of a global minimum.
您可以设置初始值以以这些方式搜索全局最小值:
使用初始点的常规网格。
如果所有问题坐标都界限,请使用从均匀分布中得出的随机点。如果某些组件不受限制,则使用正常,指数或其他随机分布提取的点。您对全球最小值的位置的了解越少,随机分布的分布就越多。例如,正常分布很少采样远离其平均值的三个以上的标准偏差,但是cauchy分布(密度)1/(π(1 +X2)))制作大大不同的样本。
在每个坐标上使用相同的初始点,并在每个坐标上加上随机扰动 - 结合,正常,指数或其他。
If you have a全局优化工具箱license, use the
GlobalSearch
(全局优化工具箱)orMultistart
(全局优化工具箱)求解器。这些求解器会在边界内自动生成随机起始点。
您对可能的初始要点的了解越多,您的搜索就越专注和成功。
Basins of Attraction
如果一个目标功能F((X)很光滑,矢量- ∇F((X)points in the direction whereF((X)decreases most quickly. The equation of steepest descent, namely
yields a pathX((t)that goes to a local minimum astincreases. Generally, initial valuesX(0)that are near each other give steepest descent paths that tend towards the same minimum point. Thebasin of attraction对于最陡的下降是导致相同局部最小值的一组初始值。
该图显示了两个一维最小值。该图以不同的线样式显示了不同的吸引力盆地,并指示了箭头最陡的下降的方向。对于此和随后的数字,黑点代表局部最小值。每一个最陡的下降路径,从一点点开始X(0),转到包含盆地的黑点X(0)。
一维盆地
This figure shows how steepest descent paths can be more complicated in more dimensions.
One basin of attraction, showing steepest descent paths from various starting points
该图显示了更复杂的路径和吸引力的盆地。
吸引人的几个盆地
约束可以将一个吸引力的一个盆地分解为几个部分。例如,考虑最小化ysubject to:
y≥|X|
y≥ 5 – 4(X–2)2。
这个图显示了两个盆地机智的吸引力h the final points.
Code for Generating the Figure
最陡峭的下降路径是直线直线到约束边界。从约束边界,最陡峭的下降路径沿边界向下传播。最后一点是(0,0)或(11/4,11/4),具体取决于初始X-value is above or below 2.