Skip to main content
2 of 2
added 21 characters in body
Glen_b
  • 290.5k
  • 37
  • 652
  • 1.1k

Hessian matrix and initial guess in logistic regression

The log-likelihood function for logistic function is $$l(\theta) = \sum_{i=1}^m(y^{(i)}\log h(x^{(i)}) + (1-y^{(i)})\log(1 - h(x^{(i)})))$$, where $$h(x^{(i)}) = \frac{1}{1 + e^{-\theta^Tx^{(i)}}}\,.$$

In order to obtain maximum likelihood estimation, I implemented fitting the logistic regression model using Newton's method. I encountered 2 problems:

  1. I try to fit the model to my data, but during the iterations, a singular Hessian matrix is encountered, what do I do with this kind of problem?

  2. With different initial guess $\theta$, will the model converge to different results?

avocado
  • 3.7k
  • 7
  • 36
  • 49