Clear Filters
Clear Filters

Why does fmincon multiple runs with same variables yield different answers?

2 views (last 30 days)
I am using fmincon for searching "best 6 variables" that define my function. The "best" is selected my minimizing the negative of Pearson's R between a recorded signal and the convolution product of the 6 variable function with an input.
i.e. minimize: -Pearson's R between recorded and (input* @(x)f (x1,x2,x3...x6) )
I use fmincon on iteration groups of 10 initial points (10X6, for the 6 variable function), 20 initial points (where the first 10 are the same as the previous pool), 50 (where the first 20 are the same as the previous pool) and so on...till 500 initial points. Then I select the answer that yeilds the lowest error (highest Pearson's R) for each iteration group (figure below).
I would expect the lowest error (highest Pearson's R) to remain the same (if the same solution is reached) or increase if a better solution is found. I however see a random decrease in the "best R" (figure below) in some runs.
I am curious if fmincon yeilds different solutions or traverses a different trajectory when the same points are run multiple times. or if there is an easier explanation to this discrepancy.
PS: I am only considering answers which have a flag>0 for judging my "true best" at each group of runs. I am also using the default "interior point" method.
xaxis represents each iteration group (of running fmincon on 10,20...500 initial points).
yaxis represents the "best R" that the algorithm finds to each iteration group

Answers (0)

Community Treasure Hunt

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

Start Hunting!