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

조회 수: 3 (최근 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 CenterFile Exchange에서 Multiobjective Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by