首页 > 代码库 > Hessian矩阵【转】

Hessian矩阵【转】

在数学中,海塞矩阵是一个自变量为向量的实值函数的二阶偏导数组成的方块矩阵,一元函数就是二阶导,多元函数就是二阶偏导组成的矩阵。求向量函数最小值时可以使用,矩阵正定是最小值存在的充分条件。经济学中常常遇到求最优的问题,目标函数是多元非线性函数的极值问题,尚无一般的求解方法,但判定局部极小值的方法就是用hessian矩阵:

在x0点上,hessian矩阵是负定的,且各分量的一阶偏导数为0,则x0为极大值点。

在x0点上,hessian矩阵式正定的,且各分量的一阶偏导数为0,则x0为极小值点。

矩阵是负定的充要条件是各个特征值均为负数。

矩阵是正定的充要条件是各个特征值均为正数。

函数如下:

<iframe id="iframe_0.779645781093077" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22http://upload.wikimedia.org/math/3/2/8/32833c34491439daba17f33da8520c0c.png?_=3740068%22%20style=%22border:none;max-width:730px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById(‘img‘);%20window.parent.postMessage(%7BiframeId:‘iframe_0.779645781093077‘,width:img.width,height:img.height%7D,%20‘http://www.cnblogs.com‘);%7D%3C/script%3E" frameborder="0" scrolling="no" width="91" height="68"></iframe>

如果f所有的二阶导数都存在,那么f的海塞矩阵即为:H(f)ij(x) = DiDjf(x),即

<iframe id="iframe_0.06794782397000398" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22http://upload.wikimedia.org/math/7/5/d/75dc4e662a991741dc6d0314b6c8a7d2.png?_=3740068%22%20style=%22border:none;max-width:730px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById(‘img‘);%20window.parent.postMessage(%7BiframeId:‘iframe_0.06794782397000398‘,width:img.width,height:img.height%7D,%20‘http://www.cnblogs.com‘);%7D%3C/script%3E" frameborder="0" scrolling="no" width="87" height="65"></iframe>

(也有人把海色定义为以上矩阵的行列式)海赛矩阵被应用于牛顿法解决的大规模优化问题。

 

性质

对称性:如果函数f在D区域内二阶连续可导,那么f海塞矩阵H(f)在D内为对称矩阵。原因是:如果函数f连续,则二阶偏导数的求导顺序没有区别,即:

<iframe id="iframe_0.458480457572805" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22http://d.hiphotos.baidu.com/baike/s%253D141/sign=72a408d9ab014c081d3b2ca13b7a025b/8644ebf81a4c510f4279676a6259252dd42aa505.jpg?_=3740068%22%20style=%22border:none;max-width:730px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById(‘img‘);%20window.parent.postMessage(%7BiframeId:‘iframe_0.458480457572805‘,width:img.width,height:img.height%7D,%20‘http://www.cnblogs.com‘);%7D%3C/script%3E" frameborder="0" scrolling="no" width="186" height="139"></iframe>

则对于海塞矩阵H(f),有<iframe id="iframe_0.38128542642875285" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22http://b.hiphotos.baidu.com/baike/s%253D114/sign=1a702e110db30f24319ae802fc94d192/2f738bd4b31c8701c0723796257f9e2f0608fffe.jpg?_=3740068%22%20style=%22border:none;max-width:730px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById(‘img‘);%20window.parent.postMessage(%7BiframeId:‘iframe_0.38128542642875285‘,width:img.width,height:img.height%7D,%20‘http://www.cnblogs.com‘);%7D%3C/script%3E" frameborder="0" scrolling="no" width="81" height="61"></iframe>,所以<iframe id="iframe_0.2685758337953872" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22http://b.hiphotos.baidu.com/baike/s%253D35/sign=fb590b4f49fbfbedd859307a79f0576a/d62a6059252dd42a89c29bdb013b5bb5c8eab8f3.jpg?_=3740068%22%20style=%22border:none;max-width:730px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById(‘img‘);%20window.parent.postMessage(%7BiframeId:‘iframe_0.2685758337953872‘,width:img.width,height:img.height%7D,%20‘http://www.cnblogs.com‘);%7D%3C/script%3E" frameborder="0" scrolling="no" width="88" height="66"></iframe>为对称矩阵。

多元函数极值的判定

如果实值多元函数<iframe id="iframe_0.7356559432917658" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22http://g.hiphotos.baidu.com/baike/s%253D108/sign=1da428cba41ea8d38e227004af0b30cf/dcc451da81cb39db98a3f826d2160924ab18305a.jpg?_=3740068%22%20style=%22border:none;max-width:730px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById(‘img‘);%20window.parent.postMessage(%7BiframeId:‘iframe_0.7356559432917658‘,width:img.width,height:img.height%7D,%20‘http://www.cnblogs.com‘);%7D%3C/script%3E" frameborder="0" scrolling="no" width="93" height="70"></iframe>二阶连续可导,并且在临界点M(xi)(其中i=1,2,...,n,并且Xi已知)处梯度(一阶导数)等于0,即<iframe id="iframe_0.8423394705391722" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22http://e.hiphotos.baidu.com/baike/s%253D77/sign=b7994f439045d688a702b0a3a5c27cda/f3d3572c11dfa9ecfe77d06760d0f703918fc161.jpg?_=3740068%22%20style=%22border:none;max-width:730px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById(‘img‘);%20window.parent.postMessage(%7BiframeId:‘iframe_0.8423394705391722‘,width:img.width,height:img.height%7D,%20‘http://www.cnblogs.com‘);%7D%3C/script%3E" frameborder="0" scrolling="no" width="111" height="83"></iframe>,则M为驻点。仅通过一阶导数无法判断在临界点M处是极大值还是极小值。

记f在M点处的黑塞矩阵为H(M)。由于f在M点处连续,所以H(M)是一个<iframe id="iframe_0.4001317704053098" src="data:text/html;charset=utf8,%3Cstyle%3Ebody%7Bmargin:0;padding:0%7D%3C/style%3E%3Cimg%20id=%22img%22%20src=%22http://d.hiphotos.baidu.com/baike/s%253D34/sign=1a378d52b11bb0518b24b52c367aa030/b17eca8065380cd72263239da344ad3459828145.jpg?_=3740068%22%20style=%22border:none;max-width:730px%22%3E%3Cscript%3Ewindow.onload%20=%20function%20()%20%7Bvar%20img%20=%20document.getElementById(‘img‘);%20window.parent.postMessage(%7BiframeId:‘iframe_0.4001317704053098‘,width:img.width,height:img.height%7D,%20‘http://www.cnblogs.com‘);%7D%3C/script%3E" frameborder="0" scrolling="no" width="164" height="123"></iframe>的对称矩阵,对于H(M),由如下结论:

  • 如果H(M)是正定矩阵,则临界点M处是一个局部的极小值。
  • 如果H(M)是负定矩阵,则临界点M处是一个局部的极大值。
  • 如果H(M)是不定矩阵,则临界点M处不是极值。

 reference:

               Hessian矩阵【转】

               BFGS算法

 

Hessian矩阵【转】