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
0
votes
0 answers

How do I compute the hessian matrix of a 3-D image in matlab?

I am using matlab for my project involving nodule detection in 3-D lung CT scans. I need to get the eigen values of the hessian matrix of 3-D lung CT scans to apply the selective dot enhancement filter. I have computed Fxx, Fxy etc using…
Ganesh Pg
  • 33
  • 6
0
votes
1 answer

Fitting Transmuted Pareto Distribution And Calculation of Hessian Matrix

I want to fit the Transmuted Pareto Distribution and thereafter need to calculate Hessian matrix of the following data. library(stats4) library(MASS) library(vcd) # for goodness of fit test library(pracma) # for hessain…
Iftikhar
  • 667
  • 4
  • 10
  • 17
0
votes
1 answer

Tensorflow: Compute Hessian matrix (only diagonal part) with respect to a high rank tensor

I would like to compute the first and the second derivatives(diagonal part of Hessian) of my specified Loss with respect to each feature map of a vgg16 conv4_3 layer's kernel which is a 3x3x512x512 dimensional matrix. I know how to compute…
Xer
  • 493
  • 1
  • 6
  • 17
0
votes
0 answers

Any optimizer module of python support object function with singular Hessian matrix?

I want to solve a constrained minimization with bound constrained and a linear inequality constraint (i.e. sum wi*xi ≤ b). However, the Hessian matrix of object function may be singular. I have tried the minimize in scipy.optimize module with SLSQP…
Eastsun
  • 18,526
  • 6
  • 57
  • 81
0
votes
1 answer

Hessian is -1 * Hessian when finding function maxima with optim

I would like to find the maxima of the function: Fd <- 224 * d1 + 84 * d2 + d1 * d2 - 2 * d1^2 - d2^2 I can do that using an 'exhaustive' search using the following code: my.data <- expand.grid(x1 = seq(0, 200, 1), x2 = seq(0, 200, 1)) d1 <-…
Mark Miller
  • 12,483
  • 23
  • 78
  • 132
0
votes
0 answers

Dimensional error computing a Hessian (for maximum likelihood)

Given that I am forcing, via the for loops, for Hessian to be an 8x8, why do i get error that it is a 2x1? Running an 8x8 Hessian to generate maxLik on nx8 regressor dataset. Getting an error that Hessian is 2x1 instead of 8x8, even though this is…
rrg
  • 655
  • 2
  • 6
  • 24
0
votes
2 answers

scipy optimize minimize: hess_inv strongly depends on initial guess

I am using scipy.optimize.minimize to minimize a simple log likelihood function. The Hessian matrix doesn't seem to behave well. import scipy.optimize as op def lnlike(theta, n, bhat, fhat, sigb, sigf): S, b, f = theta mu = f*S + b scb2…
0
votes
0 answers

Python: How to use the function nd.Hessiandiag on a complex function

I want to use the function Hessiandiag from the package (Numdifftools) to get the diagonal elements of an Hessian matrix using the optimal parameters that minimizes a function. Here's a simple example of the usage of Hessiandiag taken from…
Plug4
  • 3,838
  • 9
  • 51
  • 79
0
votes
1 answer

Setting the Hessian Threshold on Ptr

Using this particular FeatureDetector, I can't figure out how to set the Hessian Threshold. Ptr detector = FeatureDetector::create("SURF"); Anyone know how?
0
votes
1 answer

Performance w/ calculating Hessian

[edit] The part about "f" is solved. Here is what I did: Instead of using: X = (F * W' - Y); f = X' * X; I'm now using: X = F*W; A = X'*F*W; B = -2*X'*Y; Y1 = Y'*Y; f = A + B + Y1 This will give a massive speed up. Still, the problem with the…
0
votes
1 answer

Function handle for gradient and hessian problems MATLAB

I am having an issue with manipulating the function handles of my gradient and hessian. I have the following code: syms x1 x2 x = [x1,x2]; % Define the function phi(x) phi = @(x1,x2) 10*x1^4 - 20*x1^2*x2 + 10*x2^2 + x1^2 - 2*x1 + 5; % Define the…
alvarezcl
  • 579
  • 6
  • 22
0
votes
0 answers

Indefinite Hessian in optim() and disabled "start" argument in mle()

I was trying to use mle() to minimize the -log likelihood function, however it always pops out an error message like this: Error in minuslogl() (from kf.r@7524iUV#2) : argument "psi" is missing, with no default My functions is: KFlogL2 <-…
lsheng
  • 3,539
  • 10
  • 33
  • 43
0
votes
1 answer

In log(eigen(sigma, symmetric = TRUE, only.values = TRUE)$values) : NaNs produced

I am estimating a log-likelihood using optim(). I am having some problems with the eigenvalues that don't let me find a valid hessian matrix and, therefore, the standard errors can't be calculated. Here are the "warning" messages I get: Warning…
user2282564
  • 5
  • 1
  • 5
0
votes
1 answer

Ruby Matrix::Eigenvalue Decomposition error

I looked at the eigenvector matrix of a given matrix, but when I try to inverse it I have an error in eigenvector_matrix_inv(). require 'matrix' m = Matrix[ [0.5703125, 1.8369140625, 0.0, 0.0], [-0.6875, -0.4609375, 0.0, 0.0], …
Cedric H.
  • 7,980
  • 10
  • 55
  • 82
1 2 3 4 5 6 7
8