Matlab优化工具箱,优化粗麻布

时间:2018-08-24 15:58:18

标签: matlab numerical-methods

以前从未使用过此工具箱,我有一个非常大的问题(即变量数)需要优化。我知道可以优化hessian计算,考虑到错误,这就是我的问题:

Error using eye
Requested 254016x254016 (480.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may
take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.

但是根据(来自某个论坛的)引用,必须有可能优化粗麻布计算:

  

如果要使用信任区域算法,则需要   选择选项“ Hessian”,“ HessMult”和“   “ HessPattern”可避免对Hessian进行完整,显式的计算。

我很难找到这种设置的示例,有人知道吗?

如果需要这样的信息,我的问题是一个稀疏问题。

基本上,我敢肯定在行中可以添加一些其他选项:

option = optimoptions(@fminunc,...
    'Display','iter','GradObj','on','MaxIter',30,...
    'ObjectiveLimit',10e-10,'Algorithm','quasi-newton');

1 个答案:

答案 0 :(得分:1)

您可能需要将'HessPattern',Hstr添加到optimoptions。给出了一个示例here(在此示例中,Hstr中定义了brownhstr.mat;您需要计算自己的粗麻布稀疏模式矩阵Hstr)。

相关问题