zoukankan      html  css  js  c++  java
  • Hessian matrix

    You can use the Hessian for various things as described in some of the other answers.  One basic use is as a second derivative test.

    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:mathbb R	o mathbb R, and you want to optimize it, that is, find where it takes its maximum value and its minimum value.

    For a differentiable function on an open interval that can only occur where the first derivative  f'  is 0, at places called critical points. 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.

    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 derivatative 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.

    The second derivative test when there's more than one variable

    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:mathbb R^3	omathbb R

    You find the critical points.  Those will be where the three partial derivatives are simultaneously 0.  So you solve the three equations

                     frac{partial f}{partial x}=0
                     frac{partial f}{partial y}=0
                     frac{partial f}{partial z}=0

    and that will tell you where the extreme values of  f  could occur.

    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 thefunctions we're looking at are all nice.  You put them in a matrix called the Hessian  Hf.

                    Hf=left[egin{array}{ccc} frac{partial^2 f}{partial xpartial x}& frac{partial^2 f}{partial xpartial y}& frac{partial^2 f}{partial xpartial z}\ frac{partial^2 f}{partial ypartial x}& frac{partial^2 f}{partial ypartial y}& frac{partial^2 f}{partial ypartial z}\ frac{partial^2 f}{partial zpartial x}& frac{partial^2 f}{partial zpartial y}& frac{partial^2 f}{partial zpartial z} end{array}
ight]

    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  d_1,d_2,d_3. (There are more of them if  n>3. )  The first principle minor  d_1  is just the upper left entry of the matrix.  The second  d_2  is the determinant of the upper left 2 by 2 submatrix of the matrix.  And so forth. (So when  n=3,  d_3  is the determinant of the entire matrix.)

    If all of them, d_1,d_2,d_3, are positive, then you've got a minimum.  If they alternate—negative, positive, negative, etc.—then you've got a maximum.  Otherwise you've got a saddle point.

    Saddle points can occur with  ngeq 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

    .

  • 相关阅读:
    求一个数的阶乘在 m 进制下末尾 0 的个数
    区间dp
    最长公共子序列变形
    学习stm32专区
    C/C++中static关键字详解
    ASP.NET调用Office Com组件权限设置
    TreeView控件
    SQL笔记(1)索引/触发器
    NPOI 1.2.5 教程
    SQL Povit
  • 原文地址:https://www.cnblogs.com/benjaminfan/p/4420488.html
Copyright © 2011-2022 走看看