- We need to know more about your code, what it’s doing (or intends to do), what solver it uses, and for what purpose.
- What does ‘does not work’ mean?
- Posting the relevant section of code would help.
Question about "optimset" option LineSearchType
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have an old piece of code that uses optimset with the following options:
"options = optimset('LargeScale', 'off', 'HessUpdate', 'dfp', 'LineSearchType', 'quadcubic','MaxFunEvals', MaxFunEvals, ... 'display', 'off', 'MaxIter', MaxIter, 'TolFun', 1e-8, 'TolX', 1e-8);"
I get the following error" "Error using optimset (line 211) The LineSearchType option is no longer valid. It was only used by the Gauss-Newton algorithm, which is no longer used in Optimization toolbox solvers."
Dropping the option does not work. What would be a suitable replacement?
Thanks!
2 Kommentare
Star Strider
am 18 Jun. 2014
Antworten (1)
Matt J
am 18 Jun. 2014
Bearbeitet: Matt J
am 18 Jun. 2014
The "options" variable created with optimset is never used in the code. It is having no effect. It looks like the author changed his mind and switched from another another optimization tool to fminsearch. You could try instead
optimset('TolFun', 1e-8, 'TolX', 1e-8,'MaxFunEvals', MaxFunEvals, ...
'display', 'off', 'MaxIter', MaxIter,);
b1 = fminsearch('CAViaR', b0, options, y, C, THETA, 1);
You will have to experiment to find appropriate values for the above options, however. MaxIter=MaxFunEvals=100 is probably too small for a 5-variable problem.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Optimization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!