Questions tagged [hessian-matrix]

Hessian matrix is an N x N matrix containing second partial derivatives of a function with respect to its input variables.

Hessian matrices are used extensively in second-order optimization methods such as Newton's method. They give information about the curvature around a point x0 on a function surface.

119 questions
1
vote
1 answer

BoofCV / Java - Constructing Hessian matrix of an image with Gaussian convolution

I want to build a Hessian matrix of a grayscale image but I need to calculate the second order derivatives. I'm working with BoofCV and I found out a function that calculates the first order: ImageGradient_Gaussian gaussian1…
1
vote
1 answer

How to use theano.gradient.hessian? Example needed

I tried the code below: x=T.dvector('x') y=T.dvector('y') input=[x,y] s=T.sum(x**2+y**2) f=theano.gradient.hessian(s,wrt=input) h=function(input,f) Then I run it with following real values x=[1,2] y=[1,2] h([x,y] Then I encountered following…
Ghostintheshell
  • 163
  • 2
  • 7
1
vote
1 answer

Matlab gradient and hessian computation for symbolic vector function

I am trying to use the Matlab "gradient" and "hessian" functions to calculate the derivative of a symbolic vector function with respect to a vector. Below is an example using the sigmoid function 1/(1+e^(-a)) where a is a feature vector multiplied…
FFT
  • 929
  • 8
  • 17
1
vote
1 answer

Supplying fmincon with Hessian

I am trying to help fmincon to converge faster by supplying gradient vector and Hessian matrix. I am using interior-point algorithm and I realize that in such case, I have to supply Hessian using a call to another function which is assigned to…
Ali Jamali
  • 41
  • 6
1
vote
1 answer

Backwards Propagation: are analytical second derivatives worth calculating?

I understand the reason why we typically do not use second derivative information is that the Hessian can be very large with more layers and weights, leading to high computational expense, so Hessian-free methods are preferred. My question is…
1
vote
1 answer

Partial derivative of a grayscale image using MATLAB

While I was searching for Hessian matrix, I read about partial derivative of an image. I am confused and I could not imagine any meaning of a derivative of an image. How can I calculate the partial derivatives of an image?
ffttyy
  • 853
  • 2
  • 19
  • 49
1
vote
1 answer

Newton algorithm - couln't calculate Hessian

I'm trying to write an implementation of Newton algorithm in Matlab. When I call up my function using formula: result = NewtonMethod(x(1).^2 - 2.1*x(1).^4 + (x(1).^6)/3 + x(1)*x(2) - 4*x(2).^2 + 4*x(2).^4, [0 0], 0.1, 10) I've got an error…
1
vote
2 answers

How to measure gradient and Hessian matrix in matlab over gradient?

By wikipedia http://en.wikipedia.org/wiki/Hessian_matrix , it is defined to be the square matrix of second order partial derivative of a function. Can anybody tell me if it's…
user3269865
  • 49
  • 3
  • 11
1
vote
0 answers

fminunc does not take into account a user-supplied Hessian

First of all, sorry if I am asking for trivial thing but I am just learning multivariable calculus and optimization toolbox in matlab--optimization as well :) I was testing my understanding of using optimization toolbox in matlab on a simple 2D…
Celdor
  • 2,437
  • 2
  • 23
  • 44
1
vote
1 answer

CHOLMOD sparse matrix cholesky decomposition: incorrect factor?

I have been using CHOLMOD to factorise the matrix A and solve the system Ax = b, for A being the Hessian matrix (printed below) and b = [1, 1, 1] created by the cholmod_ones function. Unfortunately, the solution for x is incorrect (should be [1.5,…
Kyle_S-C
  • 1,107
  • 1
  • 14
  • 31
1
vote
1 answer

Eigenvectors and Eigenvalues of Hessian Matrix

I want to extract centreline pixels in vessel. At first I have seleted a seed point close to a vessel edge using ginput(1) command. This provides the starting point and specifies the region of interest (ROI) on a vessel segment where the analysis…
Dev
  • 329
  • 10
  • 21
0
votes
0 answers

How does scipy minimization handle cases where hessian is not positive definite

I am using from scipy.optimize import minimize to minimize a function subject to two constraints. I have been using the trust-constr method, which takes the value, gradient and the Hessian of the function. However, in my case, the Hessian may…
S R Maiti
  • 237
  • 3
  • 13
0
votes
0 answers

ziformula specification for zero-inflated binomial using glmmTMB

I am looking for some clarification on specifying ziformula= in the glmmTMB package. I understand if you have zero-inflation then ziformula=~1 if inflation is independent or any predictors (or alternatively you can specify which terms) BUT can you…
0
votes
3 answers

Evaluate expression in environment passed to function as parameter in R

I am trying to create a function for theoretical hessian matrix that I can then evaluate at different locations. First I tried setting expressions as values in a matrix or array, but although I could initially set an expression into a matrix I…
0
votes
0 answers

Normal Distribution for two groups mean estimation

Two groups i=1,2 mean estimate for normal distribution. I would like to find the gradient and the hessian of the log-likelihood using R for the two groups. The log-likelihood function: loglik=expression(log(( 1/sqrt(2*pi*sigmasq)*exp(y-mu)^2/…