Mapping unbounded parameter to bounded one for 'fminsearch'

Version 1.0.4 (1.9 KB) by Jie Jian
To enable 'fminsearch' to be used for constrained parameter ranges
88 Downloads
Updated 3 Apr 2020

View License

A local optimisation function 'fminsearch' (also known as the 'downhill simplex' method) is for unconstrained parameter ranges. If we need to do optimisation for constrained parameter ranges, we need to create periodic functions to map the unconstrained parameter space to the constrained parameter space.

This function 'mapping_parameters.m' is to help to transfer unconstrained range to a customed constrained range, then enable the 'fminsearch' function to be used to the constrained problems.

==========================================================================================
Matlab codes and example:
*Pseudo code for objective function evaluation
>> obj = obj_fun(p)
1. Define constraints a and b either locally or globally
2. Access other data as needed for evaluating obj_fun
3. Map p to p* (repeat for all p) (Matlab code mapping_parameters)
4. Work out obj = obj_fun(p*)
>> return obj_fun value

*To search for optimum p
>> p = fminsearch(obj_fun,p0,options)

==========================================================================================
Suggestions
* It is recommended to re-run at least once the downhill simplex search using the last found p as p0.
* After the search is finished, map the found p to p*. p* is the solution.
* Note that when using a local search method, you may need to repeat the whole search
* Procedure many times with different starting points

Cite As

QJ Wang & Jie Jian (2020). Mapping parameters for Matlab code 'fminsearch' (https://www.mathworks.com/matlabcentral/fileexchange/<...>), MATLAB Central File Exchange. Retrieved January 9, 2020.

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Optimization in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.4

Update profile figure

1.0.3

Add profile image

1.0.2

changed the title

1.0.1

added some introduction

1.0.0