Code covered by the BSD License  

Highlights from
fminsearch modifed for higher scale smooth function

4.25

4.2 | 4 ratings Rate this file 2 Downloads (last 30 days) File Size: 4.6 KB File ID: #5157

fminsearch modifed for higher scale smooth function

by Olivier Salvado

 

08 Jun 2004 (Updated 09 Jun 2004)

This modification of fminsearch solves an issue with the simplex when the function ...

| Watch this File

File Information
Description

This modification of fminsearch solves an issue with this simplex implementation when the function to minimize is smooth at a high scale, but rough at a low scale, i.e. when plotted with the parameters axis being (?10,10), there is a clear global extremum, but when zoomed (-0.1,0.1), the function is very rough an there are many local extremum.

The regular fminsearch initializes the first trials very close to each other, which might not be suitable for all the cases. The modification includes:
% (1) the DiffMinChange option is taken into account to limit contraction
% (2) two new options are added to initialize the starting trials (usual_delta,zero_term_delta).
% (3) there is a possibility to display patches for the cases with 2 parameters (might work for 3 parameters)

Example of calling:
options = optimset('Display','iter',...
'Diagnostics','on',...
'TolFun',0.1,...
'DiffMinChange',1,...
'DiffMaxChange',20,...
'LargeScale','off');
options.zero_term_delta = 3;
options.usual_delta = -3; % when negative, uses absolute, in this case the first % patch is {(3,0),(0,3),(0,0)} for two parameters

P = fminsearchOS(@funregister,P0,options,P1,P2)

Note: in some cases it gets stuck between contraction and shrinkage (a better modifications is probably needed), but the max number of evaluation stops it eventually.

Required Products Optimization Toolbox
MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
25 Mar 2005 hafedh gaha

Why not- It's cleverly done - thanks

01 Nov 2006 Jeff Orchard

I've never had great luck with fminsearch, until now. This is exactly what I needed. Great job!

28 Nov 2006 Dmitrey Kroshko

fminsearchOS really works much faster & yields better convergence, than current Mathworks fminsearch version. However, Shor r-alg with AST works better, at least, at those tasks I tried with. On the other hand, all my tasks were convex. I intended to connect the fminsearchOS to the OpenOpt project
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13115&objectType=file
but some problems were obtained. I hope Olivier Salvado will review the latter & connect his code to the OpenOpt.

28 Feb 2007 Valerio Conte

I used it, it seemd to have good performances BUT it stopped due to a BUG:

??? Index exceeds matrix dimensions.

Error in ==> fminsearchOS at 207
        patch(v(1,:)',v(2,:)',cmap(itercount,:))

Please fix the bug

13 Sep 2007 Sergei Koulayev

Just comment lines 203-210 if you are working with one-dimensional optimization.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
optimization Olivier Salvado 22 Oct 2008 07:22:55
simplex Olivier Salvado 22 Oct 2008 07:22:55
diffminchange Olivier Salvado 22 Oct 2008 07:22:55
fminsearch Olivier Salvado 22 Oct 2008 07:22:55
diffminchange Dung Chu 23 Feb 2010 10:34:32

Contact us at files@mathworks.com