How to define an objective function that maximize one thing and minimize the other at the same time?

4 ビュー (過去 30 日間)
I want to define an objective function that maximize the determinant and minimize the rank at the same time.
A=rand(5);
B=rand(5);
X=A+k*B;
maximize @(k) det(X)
minimize @(k) rank(X)
Is there anyway to joint both in one way?

採用された回答

Walter Roberson
Walter Roberson 2021 年 8 月 4 日
Any matrix that does not have full rank will have a determinant of 0. If there is a k in range that makes X have rank less than maximum then the determinant for that will be 0.
It can make sense to look for the smallest rank that k can drive X but all such cases will have det 0, and any full rank matrix with positive det would have larger det. That is an incompatible goal with low rank.
Exception: it is hypothetically possible that det(X) is negative for all k that do not drive X singular. In such a case both goals can be realized by looking for the k that generates the lowest rank, since det 0 would be greater than any negative det.
But I doubt that situation applies in practice.
  3 件のコメント
Walter Roberson
Walter Roberson 2021 年 8 月 4 日

You use gamultiobj() and look for Pareto fronts. You cannot combine two objectives with fminsearch, fmincon, ga, simulated annealing, patternsearch, or surrogate optimization.

However: for some situations it can make sense to take two objectives and weight them to create a biased combined single objective that is then the thing that is what is optimized.

For example hypothetically you could calculate

det(C) - rank(C) 

and maximize. It probably is not a good weighting though.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultiobjective Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by