- 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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Star Strider
el 18 de Jun. de 2014
Respuestas (1)
Matt J
el 18 de Jun. de 2014
Editada: Matt J
el 18 de Jun. de 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 comentarios
Ver también
Categorías
Más información sobre Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!