필터 지우기
필터 지우기

fminsearch combining maximum likelihood and least squares

조회 수: 1 (최근 30일)
Ben
Ben 2013년 3월 16일
Hello,
I got a question about fminsearch, I'm working on a curve fitting problem,and I would like to perform a minimization of -Loglikelihood and Least Squares.
Can I use fminsearch with a function like this:
[LogL, LS]=function(parameters)
I got two objective values.
Thanks for the help.
Ben

답변 (1개)

Tom Lane
Tom Lane 2013년 3월 16일
If you use this function, fminsearch will try to minimize the first output. You could wrap "yourfunction" in a second function and that function could return the second output, or some combination of the two. Example (did not actually try to run it):
function out = wrapper(varargin)
[neglogl,ls] = yourfunction(varargin{:});
out = (neglogl+ls)/2;

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by