>> [parameters,criteria,message,output] = minimizer(objective, guess, options)where the input arguments are:
>> [parameters, fval, exitval, output] = fminimfil(function, starting_parameters, options, {constraints})
where the options and output arguments are structures.
All of these methods support constraints on parameters during the
optimization process (see below).function y=objective(p)In case the objective requires additional arguments, just pass them to the fits method (arguments above the 4th)
y = ...
>> p=fminsce(objective, [ 0.5 1 0.01 0 ],options, constraints, additional_arguments);assumes the objective function has syntax
objective(p, additional_arguments)Last, the starting parameter 'guess' can also be specified as a structure which fields contain numbers, or as a string with members separated with the ';' character, such as in the following example:
>> p.par1=4; p.par2=5; % optimize two parameters with names par1 and par2.
>> fminsce(objective, p) % The result is also returned as a structure.
>> fminsce(objective, 'par1=4 ;par2=5') % create the structure above and optimize...
>> fmin(objective, p)
When more than one optimizer is suitable, a random choice is performed,
with a weighting by the success ratio and the number of function calls
(optimization speed). Successive calls to fmin with the same problem to solve may result in different optimizers and solutions.Optimizer |
Description
(continuous problems) |
Mean
Success
ratio
(%) |
Cost function calls (iterations) |
fminpso [8] | Particle Swarm Optimization | 97.9 | 2757 |
fminpowell [13] | Powell with Coggins line search | 99.21 | 324 |
fminhooke [12] | Hooke-Jeeves direct search | 97.2 |
1177 |
fminimfil [3] | Unconstrained Implicit filtering |
93.5 | 1424 |
fminralg [4] | Shor R-algorithm | 88.9 | 165 |
fminsimpsa [1] | simplex/simulated annealing | 97.1 |
2795 |
Optimizer |
Description
(noisy problems) |
Mean
Success
ratio
(%) |
Cost function calls (iterations) |
fminpso [8] | Particle Swarm Optimization | 84.1 |
3079 |
fminsimpsa [1] | simplex/simulated annealing | 84.8 |
3672 |
fminsce [10] | Shuffled Complex Evolution | 85.2 |
3184 |
fmincmaes [9] | Evolution Strategy with Covariance Matrix Adaptation | 71.3 |
2066 |
fminimfil [3] | Unconstrained Implicit filtering | 56.8 |
2805 |
fminhooke [12] | Hooke-Jeeves direct search | 56.3 |
3067 |
>> fits(iData)
Function Name |
Description |
Success ratio |
Success ratio (noisy) [%] |
Comments |
fminanneal [18] |
Simulated annealing |
83.0 |
21.1 |
fast |
fminbfgs [19] |
Broyden-Fletcher-Goldfarb-Shanno |
76.1 |
3.4 |
fastest gradient |
fmincgtrust [5] |
Steihaug Newton-Conjugate-Gradient-Trust |
88.0 |
13.9 |
rather fast |
fmincmaes [9] |
Evolution Strategy with Covariance Matrix Adaptation |
88.9 |
71.2 |
fastest swarm |
fminga [15] |
Genetic Algorithm (real coding) |
97.2 |
77.6 |
very slow |
fmingradrand [6] |
Random Gradient |
78.3 |
25.8 |
slowest gradient |
fminhooke [12] |
Hooke-Jeeves direct search |
97.1 |
56.3 |
Fast and successful |
fminimfil [3] |
Implicit filtering |
93.5 |
53.8 |
most successful gradient |
fminkalman [20] |
unscented Kalman filter |
75.9 |
36.9 |
|
fminlm [7] |
Levenberg-Maquardt |
80.2 |
4.7 |
|
fminnewton [21] |
Newton gradient search |
76.7 |
21.3 |
|
fminpowell [13] |
Powell Search with Coggins |
99.2 |
51.7 |
fast and successful |
Powell
Search with Golden rule options.Hybrid='Coggins' |
slower than with Coggins | |||
fminpso [8] |
Particle Swarm Optimization |
97.9 |
84.1 |
|
fminralg [4] |
Shor r-algorithm |
88.9 |
16.2 |
very fast |
fminrand [22] |
adaptive random search |
74.6 |
62.2 |
|
fminsce [10] |
Shuffled Complex Evolution |
95.7 |
85.2 |
slow |
fminsearchbnd [2] (fminsearch) |
Nelder-Mead simplex (fminsearch) |
65.8 |
11.5 |
Matlab default. |
fminsimplex [14] |
Nelder-Mead simplex (alternate implementation
than fminsearch) |
82.5 |
39.9 |
|
fminsimpsa [1] |
simplex/simulated annealing |
97.1 |
84.8 |
slow |
fminswarm [11] |
Particule Swarm Optimizer (alternate
implementation than fminpso) |
95.0 |
75.3 |
slow |
fminswarmhybrid [11] |
Hybrid Particule Swarm Optimizer |
91.6 |
47.1 |
fast swarm |
>> [parameters,criteria,message,output]= fminimfil(model, initial_parameters, options, constraints)
>> p=fminimfil(objective, starting, options, [ 1 0 0 0 ])will fix the first model parameter. A similar behavior is obtained when setting constraints as a structure with a fixed member :
>> constraints.fixed = [ 1 0 0 0 ];The constraints vector should have the same length as the model parameter vector.
>> p=fminimfil(objective, starting, options, [ 0.5 0.8 0 0 ], [ 1 1.2 1 1 ])A similar behavior is obtained by setting constraints as a structure with members min and max :
>> constraints.min = [ 0.5 0.8 0 0 ];The constraints vectors should have the same length as the model parameter vector, and NaN values can be used not to apply min/max constraints on specified parameters.
>> constraints.max = [ 1 1.2 1 1 ];