How to compute the hessian matrix, when I'm using a Nelder-Mead maximum optimization of a function
이전 댓글 표시
Hi,
I'm performing a nelder-mead optimization of a function (f), and I want to calculate the coefficient of variance matrix (COVmatrix). To do this I want to use the inverse Hessian matrix or inverse fisher information matrix. Is there an command in matlab that finds this??
Thanks!
My script:
clc;clear all; close all;
T = [1651 1640 1670 1670 1658 1668 1647 1661]; % Test data
f = @(x) -(sum(log10(wblpdf(T,x(1),x(2))))); % Function
[x,fval] = fminsearch(f,[1600, 100]) % Finds maximum values of x(1) and x(2)
답변 (1개)
Alan Weiss
2015년 4월 15일
0 개 추천
I am not aware of anything in base MATLAB, but there is at least one Hessian calculator on the File Exchange.
Alan Weiss
MATLAB mathematical toolbox documentation
댓글 수: 4
Trond Oesten
2015년 4월 15일
For anyone else still curious about this, the paper by Nelder and Mead provides a method to estimate the information matrix in the appendix. Basically, you produce intermidiate points between all the points in your simplex so you get (N+1)(N+2)/2 total points. Then transform those points into a new coordinate system where the minimum of the simplex is the origin and each point in the original simplex represents the new axes. Fitting a quadratic to that surface provides you with your information matrix in that coordinate system. You then need to transform it back into your original coordinate system.
I've created an appended version of fminsearch that contains the code to do this if it's of any interest.
Jacek Barszczewski
2022년 1월 24일
Hi Dean, I'm interested in this code. I would be very grateful!
Pedro Gardete
2024년 2월 7일
Same here! Could you perhaps share it or post it somewhere? Thank you...
카테고리
도움말 센터 및 File Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!