Closed adityam closed 8 years ago
@adityam can you try conv(pxd,ps)
?
I think conv expects first argument to be a value and the second one to be a variable.
Thanks. That works! (in that I don't get an error). But now I get
WARNING: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
WARNING: Problem not DCP compliant: objective is not DCP
and then
WARNING: Problem status Unbounded; solution may be inaccurate.
1.0
[5.969074075048959e-7
-1.8826116855053157e-7
5.969074075030421e-7]
which violates the constraint.
So, I guess that I cannot use Convex.jl to solve this problem :-(
@adityam Convex.jl uses DCP rules to determine the convexity and if the expressions are not DCP compliant, it is not advisable to use Convex.jl for convex optimization.
DCP compliance implies convexity but the converse is not true.
For example sqrt(square(x))
is convex but non-DCP.
@adityam, thanks for posting this issue. There are two problems you're having:
1) conv is not defined when the second argument is a variable (and the first is constant). That's a bug and should (and will) be fixed. 2) the difference of two entropy is not DCP compliant: entropy is concave, -entropy is convex, and so the vexity of their sum cannot be determined from the parts. However! If you know the expression is convex, you may be able to reexpress that function in a different way that is DCP compliant. For example, can you express it as a single entropy, or as a KL divergence?
@Ayush-iitkgp @madeleineudell , Thanks!
The expression can be expressed as mutual information (and hence KL divergence) expression. I'll try that and see if it works (convexity is not obvious from the mutual information expression either; our proof uses Cauchy-Schwartz inequality at some stage). I'll also read up on DCP rules and see if I can figure out a way to express way that satisfies those rules.
Hi,
I am trying to optimize the difference between two entropy expressions (which, we can prove is convex). The code is as follows:
When I run it, I get the error:
Any ideas on how to circumvent that?