海森矩陣 What is the Hessian matrix? What is it used for and for what reason?




您可以將Hessian用于其他答案中描述的各種事物。一種基本用法是作為第二階導(dǎo)數(shù)測試。

一階微積分的二階導(dǎo)數(shù)檢驗

The second derivative test In calculus of one variable
Do you remember first semester calculus when you learned the second derivative test? It went like this. You've got a function f, and you want to optimize it;find where it takes its maxunum value and its minimum value.
當您學習二階導(dǎo)數(shù)測驗時,您還記得第一學期的微積分嗎? 像這樣您已經(jīng)有了一個函數(shù)f:R->R,并且想要對其進行優(yōu)化;找到它取最大值和最小值的位置。
For a differentiable function on an open interval that can only occur where the first derivative f' is 0, at places called critical point. So you computed the first derivative. set it to 0, and solved the equation f ' (x) = 0. That told you where you might find the extreme values of f .
對于開放區(qū)間上的微分函數(shù),該區(qū)間只能在第一階導(dǎo)數(shù)f'為0的情況下發(fā)生在臨界點處。 因此,您計算了一階導(dǎo)數(shù)。 將其設(shè)置為0,并求解方程f'(x)=0。這告訴您在哪里可以找到f的極值。
Then you took the second derivative f'' , and evaluated it at each of the critical points in turn. If the second derivative was negative. then you had a local maximum; if the second derivative was positive. then you had a local minimum; if the second derivative was zero. then the test was inconclusive and you had to try something else:
然后,您取二階導(dǎo)數(shù)f'',并依次在每個關(guān)鍵點對其進行評估。 如果二階導(dǎo)數(shù)為負。那么你有一個局部最大值 如果二階導(dǎo)數(shù)為正。 那么你有一個局部最小值 如果二階導(dǎo)數(shù)為零。 那么測試是不確定的,您必須嘗試其他方法:
The second derivative test when there's more than one varlable
Now you've got a function of n variables. Let's make it three variables to make it complicated enough to see what's going on. f : R3-->R
You find the critical points. Those will be where the three partial derivatives are simultaneously 0. So you solve the three equations

一個變量以上時的二階導(dǎo)數(shù)測試

現(xiàn)在,您有了n個變量的函數(shù)。 讓我們將其設(shè)為三個變量,使其足夠復(fù)雜以查看正在發(fā)生的情況。 f:R3-> R
您找到了關(guān)鍵點。 這些將是三個偏導(dǎo)數(shù)同時為0的地方。因此,您可以求解三個方程



and that will tell you where the extreme values of f could occrur
Next you take all the second partial derivatives of them. There are nine of them,but the mixed partial derivatives are going to be the same since the functions we're looking at are all nice. You put them in a matrix called the Hessian Hf.
這將告訴您f的極值可能會出現(xiàn)在哪里
接下來,您將使用它們的所有第二個偏導(dǎo)數(shù)。 它們有九個,但是混合的偏導(dǎo)數(shù)將是相同的,因為我們要查看的函數(shù)都很好。 您將它們放在稱為Hessian Hf的矩陣中。



Evaluate this Hessian at each of your critical points. and the resulting matrix will tell you what kind of critical point it is.
Like the second derivative test for functions of one variable,sometimes it’s inconclusive.That will happen when the determinant of the Hessian is 0. If that determinant is not 0 ,you can tell. In order to tell, you have to compute the sequence of principle minors d1, d2, d3. (There are more of them if n > 3. )
The first principle minor d1 is just the upper left entry of the matrix. The second d2 is the determinant of the upper left 2 by 2 submatrix of the matrix.And so forth. (So when n = 3, d3 is the determinant of the entire matrix)

在您的每個關(guān)鍵點上評估此粗麻布。 然后得出的矩陣將告訴您這是哪種臨界點。
就像對一個變量的函數(shù)進行二階導(dǎo)數(shù)檢驗一樣,它有時是不確定的。當Hessian的行列式為0時,就會發(fā)生這種情況。 為了說明這一點,您必須計算主輔音d1,d2,d3的順序。 (如果n> 3,則更多。)
第一個基本次要d1只是矩陣的左上角條目。 第二個d2是矩陣左上角2×2子矩陣的行列式,依此類推。 (因此,當n = 3時,d3是整個矩陣的行列式)
If all of them, d1, d2, d3, are positive, then you've got a minimum. If they alternate_negative. positive, negative, etc.-then you've got a maximum.Othenwise you've got a saddlle point.
Saddle points can occur with n > 2. A function with a saddle is illustrated below.
So, that's one reason for a Hessian. It's used in a second derivative test to find extreme values of functions of more than one variable.
如果所有d1,d2,d3均為正數(shù),則您有一個最小值。 如果它們?yōu)閍lter_negative。 正數(shù),負數(shù)等-然后得到最大值,然后得到鞍點。
當n> 2時,可能會出現(xiàn)鞍點。帶有鞍的功能如下所示。
因此,這就是使用海森矩陣的原因之一。 在二階導(dǎo)數(shù)測試中使用它來查找多個變量的極值。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,817評論 0 10
  • The Inner Game of Tennis W Timothy Gallwey Jonathan Cape ...
    網(wǎng)事_79a3閱讀 12,879評論 3 20
  • 周末往返深圳長沙兩地的高鐵,將弗蘭克上次送的《越孤獨 越自由》塞進了行李箱。 坦白來說,我對本書的作者傅踢踢一無所...
    旦卉閱讀 378評論 0 0
  • 當你見過最深邃的大海 那所有的湖泊河流在你面前都不值一提 當你爬過最危聳的喜馬拉雅 那任何一座山峰在你腳下都毫無壓...
    乙卉閱讀 203評論 0 4
  • 《一剪梅》 紅藕香殘玉簟秋,輕解羅裳,獨上蘭舟。 云中誰寄錦書來,雁字回時,月滿西樓。 花自飄零水自流,一種相思,...
    困澀不知閱讀 672評論 1 6

友情鏈接更多精彩內(nèi)容