Alternative functions to fminsearch?

조회 수: 11 (최근 30일)
Rick
Rick 2014년 3월 19일
편집: Matt J 2014년 3월 19일
Hi all,
I am trying to develop a tool to perform the hypersphere decomposition of a matrix as explained in section2 of “the most general methodology to create a valid correlation matrix for risk management and option pricing purposes” by Rebonato and Jackel (1999) (Google will get it). I can only use this algorithm and I would like to make the matrix PSD.
I have to iteratively change the angular coordinates (see the paper for more info) so that the norm of the non-PSD matrix and the final PSD matrix is minimized. To minimized that and find the final matrix, I am using the fminsearch function: as long as I test the tool on small matrices (ie 15*15), the code works properly, however, as soon as I increase the size of the matrix (my final matrix will be around 1500*1500), I get an “out of memory” message from Matlab. I guess that the problem is due to the fminsearch function, which cannot deal such a functions with so many inputs to be changed or compare such a big amount of data.
Does anyone of you know alternative functions to fminsearch, based on different algorithms and that I can use to solve my tool? I think I might need something that stores as few data as possible while minimizing the target function, so that the huge amount of data does not fill all the available memory and break my code. (I am currently trying with fminunc, but I am still not sure this will work).
Many thanks for your help, Rick

답변 (1개)

Matt J
Matt J 2014년 3월 19일
편집: Matt J 2014년 3월 19일
Well, fminsearch definitely isn't the thing to use. It's designed for small numbers of unknowns (<=6).
However, it sounds like your problem has a simple analytical solution. I assume you are minimizing the function
f(A) = norm(A.'*A - T,'fro')^2
where T is some symmetric target matrix and S=A.'*A is the desired psd matrix. I believe the closed form soluion for this is simply
[V,D]=eig(T);
S=real( V*(D.*(D>=0))*V.' );

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by