5
2

I'm looking for an open source convex optimization library on the JVM. What's good out there?

A question similar to this has been asked on StackOverflow (here). It'd be nice to hear what the metaoptimize user base has to say. For reference, I'm primarily interested in convex optimization at the moment in the CVX tradition (in the tradition of Boyd and Vandenberghe), and not general 'mathematical optimization' as in the SO question.

asked Jul 07 '10 at 13:43

Hamilton%20Ulmer's gravatar image

Hamilton Ulmer
156269


6 Answers:

This is a shortcut and may fail on large projects but you can simply take Boyd's CVX tool in Matlab and use "Matlab builder for JAVA" to make it a Java library. You should be able to call it from any Java code.

This document may help. It shows you how you can use builder and Eclipse to work that out.

answered Jul 07 '10 at 17:16

Mark%20Alen's gravatar image

Mark Alen
1323234146

If you're looking for unconstrained optimization, my NLP package has a generic optimize a function package. I don't have any constrained optimization. Check out the java package edu.umass.nlp.optimize. In particular there is an L-BFGS implementation.

answered Jul 07 '10 at 18:13

aria42's gravatar image

aria42
209972441

edited Jul 08 '10 at 22:22

As far as I know it's mostly SVMs and similar techniques that use constrained optimization in ML (except for positivity constraints or constrained loss minimization with maximum norm). You can find a lot of specialized optimizers for this sort of problem (quadratic programs, for example), but in general, when a ML algorithm needs a general purpose convex optimizer people just use one prepackaged.

answered Jul 07 '10 at 18:24

Alexandre%20Passos's gravatar image

Alexandre Passos ♦
2554154278421

Depending on how committed you are to something in the CVX/"disciplined convex programming" tradition, this may or may not be helpful. A year or two back, a convex optimization problem showed up at work. I searched for an open-source, java L-BFGS implementation (memory was an issue, and I didn't want to deal with JNI). I found this (http://riso.sourceforge.net/), which worked after some small changes. I think it was an automatic translation from old Fortran code, and is out of date (read : will not run on java 6 without some tweaks). Of course, with this kind of thing you don't get the full, smart feature set of CVX, and you have to provide your own function to compute the gradient of whatever it is you're optimizing. And it's clunky enough that I ended up rolling my own, which turned out to be more fun anyways.

I would point out that a lot of these quasi-newton algorithms for convex optimization aren't that hard to do yourself, and I recall it being kinda fun to read about and implement one. I think things only get really tricky when you have weird bounds to contend with.

answered Jul 08 '10 at 01:58

abeppu's gravatar image

abeppu
0

Be careful if rolling your own, people have reported significant differences between L-BFGS implementations based on subtle things like line search heuristics.

(Jul 08 '10 at 13:36) cityhall

There are Java wrappers for GSL if you're willing to link to native libraries. GSL should be faster than any pure Java implementation.

http://jgsl.sourceforge.net/

answered Jul 08 '10 at 13:37

cityhall's gravatar image

cityhall
76378

you can watch http://www.joptimizer.com. From the website you can download a library implemented in Java that allows to solve convex optimization problems. in http://www.joptimizer.com/ is also possible to see some examples

answered Mar 14 '14 at 12:42

Cristiana's gravatar image

Cristiana
1

Your answer
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.