2

I am trying to find a java version of octave's fminunc (function minimization unconstrained) library in Java. The goal is to use it for logistic regression.

Currently, I am using a home-brewed version of gradiant descent for cost minimization and I would like to be able to use an already existing library to do that (in Java) for me. This is related to my effort of porting octave code that we have from the Coursera Machine Learning course to Java.

Darth.Vader
  • 5,079
  • 7
  • 50
  • 90
  • Is the goal to use Logistic Regression, or to learn how to implement such algorithms in Java? – Raff.Edward Dec 27 '13 at 07:32
  • The goal is to implement logistic regression without having to worry about the function minimization algorithm. – Darth.Vader Dec 27 '13 at 08:22
  • I'd be very interested in this as well. I recently saw a project to implement the octave language and functions in java, but I seem to have lost it. You might be able to find it again by doing a little digging. – Brill Pappin Jan 02 '14 at 17:01

3 Answers3

1

Thanks, Brill. I ended up using QNMinimizer from Stanford NLP Library.

Darth.Vader
  • 5,079
  • 7
  • 50
  • 90
  • is there any difference between fminunc and QNMinimizer? which one is better in your mind? – danny Sep 27 '17 at 13:15
1

If anyone found the previous two answers unsatisfactory, I have ported the Fmincg function to Java. The Fmincg function takes the same inputs as Fminunc, and it is has better performance for large datasets. https://github.com/Dan12/MachineLearning/blob/master/src/main/java/com/mycompany/maventest/Fmincg.java

Dan12-16
  • 351
  • 1
  • 8