Can the multiobjective optimization solver GAMULTIOBJ work with least squares?

Hello,
I need to minimize two objectives both of which are in the following least squares format:
objective 1: F1 = min sum((Y-Yexp)^2) objective 2: F2 = min sum((P-Pexp)^2)
Can F1 and F2 be the objective functions components of the vector F(x) that I want to minimize using 'gamultiobj'?

 Accepted Answer

Thanks for the clarification. Perhaps you can simply use lsqcurvefit or lsqnonlin with a modification to your model functions. The following is not really code, but should give you enough information to write the code you need.
Augment your data matrix x with a row containing a 1 wherever you want to use f1 as your model function, and a 0 wherever you want to use f2. Then write your total model function F = x(newrow)*f1(x,a,b,c) + (1-x(newrow))*f2(x,b,c,d). Your responses Y1 and Y2 are similarly combined into one output data matrix or vector.
Now lsqcurvefit will attempt to find a,b,c,d to minimize the total sum of squares.
I hope this works for you.
Alan Weiss
MATLAB mathematical toolbox documentation

2 Comments

Thank you so much! I have used 'lsqcurvefit' and 'fmincon' to minimize the total sum of squares. Is there a way to use these solvers if I want to add weights to the objective functions? Also, I would like to generate the pareto set. I am trying to figure out why 'gamultiobj' gives completely unreasonable values of the parameters that maximize the function values.
I'm glad that my suggestion worked for you. Please accept my answer if you believe it answered your question.
For the question of weighted least squares, well, fmincon can minimize any function you can describe, so if you know what your weighted objective function is, then just write it and set fmincon loose. Similarly, lsqnonlin minimizes a sum of squares in almost any form.
As for gamultiobj, I assume you misspoke when you said it didn't maximize things well, because it is a minimizer. To maximize things (if that is what you want), multiply the objectives by -1, as in the documentation. And it can be important to tune the parameters of the genetic algorithm, such as by setting an appropriate initial range (the PopInitRange option at the command line).
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

More Answers (1)

I'm sorry, I do not understand your question. Are you having trouble formulating your objective functions in the form that gamultiobj requires? Take a look at this example for one piece of working code.
Alan Weiss
MATLAB mathematical toolbox documentation

1 Comment

Thanks for replying! Yes, I am having some trouble formulating the objective functions. I'll be a bit more specific.
I have two nonlinear functions with several parameters which have to be fitted to experimental data, X, Y1, Y2:
f1(X,a,b,c) - the first function has three parameters a,b,and c that have to be determined by fitting the function to Y1.
f2(X,b,c,d) - the second function has three paramaters b,c, and d that have to be determined by fitting the function to Y2.
I have two objectives that uses least squares minimization as follows:
Objective 1: min (sum(f1 - Y1)^2) over all data points
Objective 2: min (sum(f2 - Y2)^2) over all data points
I need to find values of the four parameters (a, b, c, d) such that both the objectives are met. Only 3 out of the 4 parameters are in each objective. Also, there are upper and lower bounds on some of the parameters.
I am not sure how to implement this in MATLAB. I used "gamultiobj" with the least squares objectives but I get values for the parameters that seem to maximize the function values instead of minimizing them. Any help on this matter is greatly appreciated.

Sign in to comment.

Asked:

Naz
on 20 Feb 2013

Community Treasure Hunt

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

Start Hunting!