how I found W1,W2 ?
Afficher commentaires plus anciens
f= w1 F1(x) + w2 F2(x)
Consider the problem for minimize F1(x)and maximize F2(x)
Wi = weight value
how I found W1,W2 ? help me please!!
Réponses (2)
John D'Errico
le 2 Avr 2018
Modifié(e) : John D'Errico
le 2 Avr 2018
Huh?
First, you would simply minimize
f = w1*F1(x) - w2*F2(x)
for some choice of positive w1 and w2.
But ONLY YOU can choose the values of w1 and w2. They would represent the relative importance of these two functions, as well as the relative scaling of the two functions, to make them both of roughly the same size.
Completely your choice though.
You might want to do some reading here:
https://en.wikipedia.org/wiki/Multi-objective_optimization
https://en.wikipedia.org/wiki/Pareto_efficiency
1 commentaire
ahlem sellami
le 2 Avr 2018
Walter Roberson
le 2 Avr 2018
0 votes
F1(x) and F2(x) are whatever they are. Changing w1 and w2 will not change them.
Is f a fixed value and is the question to fit a bunch of known points? You can use the \ operator for fitting. But that will not have anything to do with minimizing or maximizing.
Are there bounds on the weights or on their sum?
11 commentaires
ahlem sellami
le 2 Avr 2018
Modifié(e) : Walter Roberson
le 2 Avr 2018
Walter Roberson
le 2 Avr 2018
Your w1 and w2 are not inputs to F1 or F2, so there does not appear to be anything to minimize or maximize.
ahlem sellami
le 2 Avr 2018
Steven Lord
le 2 Avr 2018
It's not really clear WHAT you're trying to do. Tell us in more detail what your ultimate goal is and what you're allowed to modify in order to achieve that goal.
- Can you change f1(x) and f2(x)?
- Can you change x?
- Can you change w1 (which will fix the value of w2 at w2 = 1-w1)?
- Can you change multiple of those quantities, and if so which ones?
With that information we may be able to offer more detailed suggestions for how to proceed.
ahlem sellami
le 3 Avr 2018
Walter Roberson
le 3 Avr 2018
Then pick your linear weights in advance and minimize w2*F2(x) - w1*F1(x)
This will seldom be a good solution but it is something.
ahlem sellami
le 3 Avr 2018
Torsten
le 3 Avr 2018
So, to summarize:
You search for weights w1 and w2 such that - by mimimizing w2*F2(x)-w1*F1(x) - you get a vector x as solution that simultaneously minimizes F2(x) and maximizes F1(x) as stand-alone functions ?
If so: such weights do not exist in general.
Best wishes
Torsten.
Walter Roberson
le 3 Avr 2018
Take the very simple example
F1 = @(x) x;
F2 = @(x) x;
Now try to choose weights so that w1*F1(x) + w2*F2(x) simultaneously maximizes F1 and minimizes F2. Now, for any given pair of weights, as you increase x, w1*F1(x) and w2*F2(x) both increase, so you can maximize F1 by increasing x; and for any given pair of weights, as you decrease x, w1*F1(x) and w2*F2(x) both decrease, so you can minimize F2 by decreasing x. If you increase x then you make F2(x) worse for any given weights; if you decrease x then you make F1(x) worse for any given weights. So what weights and what x do you choose?
For this particular system, w1*F1(x) + w2*F2(x) = w1*x + w2*x = (w1+w2)*x and you defined w1+w2 as 1 so this is 1*x = x. So for weights under the constraints you define, you would be asking to simultaneously maximize and minimize x. How do you choose the x?
What you are asking for simply has no solution in general, even in some simple cases.
Is there a solution in some cases? Possibly. To find the maxima and minima of w1*f1(x) + w2*f2(x) we take its derivative and solve for 0:
solve(diff(w1*f1(x) + w2*f2(x), x)==0, x)
This is
solve(w1 * diff(f1(x),x) + w2 * diff(f2(x),x) == 0, x)
and sometimes that has a solution, x = something. You would then take
subs(diff(f1(x),x,x), x, something)
and check the sign of the result, to find the conditions on w1 and w2 under which the sign is negative, which are the places where x = something would maximize f1. If there are no places the sign can become negative then the task is not possible for that f1. If there are, then
subs(diff(f2(x),x,x), x, something)
and look at the sign under the situations found for diff(f1(x),x,x) and look for a positive. If you can find situations in which it can be positive then you have identified a minima for f2.
These will not necessarily be global minima or maxima, but at least they would be simultaneous.
Walter Roberson
le 3 Avr 2018
By the way if you can find analytic solutions for the above then you do not need to perform the optimization...
Walter Roberson
le 3 Avr 2018
Also remember that solve(diff(w1*f1(x) + w2*f2(x), x)==0, x) might be solving for a maxima rather than a minima.
Catégories
En savoir plus sur Surrogate Optimization dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!