4

I am trying to implement a logistic regression function in c++, and not sure what algorithm to use. So far I have heard of these:

  1. Newton-Raphson
  2. IRLS
  3. Gradient descent

Are there other algorithms available? What are their pros and cons? Is there an algorithm generally recognized as superior to the others?

qed
  • 2,808

1 Answers1

3

Partially answered in comments:

Pretty much any decent optimization algorithm can work under at least some circumstances. Fisher scoring is very widely used and is convenient. – Glen_b

And if you incorporate step-halving into the algorithms they usually work well. – Frank Harrell

Much used is iteratively reweighted least squares (IRLS), which is a reformulation of the Newton method. See here.