Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab优化工具箱,优化hessian_Matlab_Numerical Methods - Fatal编程技术网

Matlab优化工具箱,优化hessian

Matlab优化工具箱,优化hessian,matlab,numerical-methods,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 be

以前从未使用过这个工具箱,我有一个非常大的问题(即变量的数量)需要优化。我知道优化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计算:

如果要使用信赖域算法,则需要 选择一些选项组合“Hessian”、“Hessult”和 “HessPattern”以避免对Hessian进行完整、明确的计算

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

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

基本上,我确信有一些额外的选项可以放在一行中,如:

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

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

您没有显示要优化的代码。甚至没有提到你正在使用的功能!如果你不分享相关信息,我们也帮不了你!我想你看过文件了吧?我想,
HessPattern
可能就是我要找的。但我不知道如何使用它。所以@AnderBiguri是的,我读过它。“我不知道如何使用它”不是一个问题。这就是您阅读的文档中所解释的内容。如果你知道黑森河的非零模式,你可以在那里给出。否则,您可能需要使用不需要优化的优化方法Hessian@user8469759它是一个稀疏矩阵。你可以尽可能多地搜索它,以了解为什么这些需要更少的内存。