[SciPy-user] How to determine if a function is convex or not ?

Joachim Dahl dahl.joachim@gmail....
Mon Jun 18 03:54:52 CDT 2007


there are many ways to determine if a function is convex,  but not a single
best check for
all circumstances.   Perhaps the simplest approach is to verify that the
Hessian matrix
is positive semidefinite everywhere by construction,   or to use composition
rules:
http://www.stanford.edu/~boyd/cvxbook/

If you want to use CVXOPT for a general convex problem you first have to
make sure
the problem is actually convex (of course), and then you have to provide
functions for evaluating
first and second order derivatives,  which sounded problematic in your case.

What about the general nonlinear programming package someone else
suggested?  That might
work for you (provided you figure out how to evaluate derivatives,  which
can be cumbersome
but should be possible nevertheless).

On 6/18/07, fdu.xiaojf@gmail.com <fdu.xiaojf@gmail.com> wrote:
>
> Hi all,
>
> CVXOPT(http://abel.ee.ucla.edu/cvxopt) can handle both equality and
> inequality constraints, but it can only deal with convex functions.
>
> So I want to know how to determine if a function is convex or not. Are
> there some rules for this? Or I have to calculate the derivatives ?
>
> Thanks.
>
> Xiao Jianfeng
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070618/59fdbe09/attachment.html 


More information about the SciPy-user mailing list