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)}}}$$. And according$$h(x^{(i)}) = \frac{1}{1 + e^{-\theta^Tx^{(i)}}}\,.$$
In order to maximum likelihood estimationobtain maximum likelihood estimation, I implemented fitting the LRlogistic regression model fitting using Newton's method, and. I encountered 2 problems:
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?
With different initial guess $\theta$, will the model converge to different results?