0

I have to solve the following optimisation problem in R Mosek:

enter image description here

This is a convex constraint which can be transformed into the intersection of 2^N-1 cone constraints and one half space:

enter image description here

This is unfeasible in my actual case because N=50. What can I do? Is it my problem impossible to be solved (with R Mosek)?


Edit following the answer:

Is it my constraint

enter image description here

equivalent to

enter image description here

TEX
  • 2,249
  • 20
  • 43
  • Not sure I understand your transformation. Try `N=2`, `y1 = b1^T x - c1 = 0.1` and `y2 = b2^T x - c2 = 0.2`. Then your first inequality says `log(1+exp(y1)) + log(1+exp(y2)) - 2*log(2) = 0.15 <= 0.0` (violated), while your second says `exp(y1) + exp(y2) + exp(y1+y2) = 3.67 <= 4` (satisfied). Were these supposed to be equivalent? – Henrik Alsing Friberg Jan 28 '22 at 09:41

2 Answers2

1

For the sake of completeness I repeat my comment as an answer. You can write

t_i >= log(1 + exp(b_i^Tx-c_i))

using two exponential cones as in https://docs.mosek.com/modeling-cookbook/expo.html#softplus-function This is a very special case of a more general log-sum-exp, namely log(exp(0) + exp(b_i^Tx-c_i)).

Then the constraint becomes

sum t_i <= N \log(2)

If you use Rmosek then you can find pretty much ready code in https://docs.mosek.com/latest/rmosek/case-studies-logistic.html#doc-case-studies-logistic

0

Update: See the comments first.

It is a log sum exp constraint that can easily be dealt with. Indeed your first constraint is equivalent to

\begin{array}{rcl}
\log{\sum_{i=0}^n e^{t_i}} & \leq & s, \\
t_0                        & =    & 0, \\
b_i^Tx-c_i - t_i           & =    & 0, \\
s                          & =    & n\log{2}. \\
\end{array}

PS. I could not get the math formatting to work.

ErlingMOSEK
  • 391
  • 1
  • 7
  • Sorry but I have sum of logs and not log of sums. Your expression does not seem equal to mine. – TEX Jan 28 '22 at 08:55
  • @TEX The special case you need is mentioned here https://docs.mosek.com/modeling-cookbook/expo.html#softplus-function – Michal Adamaszek Jan 28 '22 at 09:28