- 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
조회 수: 4 (최근 30일)
이전 댓글 표시
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
Star Strider
2014년 6월 18일
답변 (1개)
Matt J
2014년 6월 18일
편집: Matt J
2014년 6월 18일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!