How to compute Hessian matrix for log-likelihood function for Logistic Regression
I am currently studying the Elements of Statistical Learning book. The following equation is in page 120.
It calculates the Hessian matrix for the log-likelihood function as follows
\begin{equation} \dfrac{\partial^2 \ell(\beta)}{\partial\beta\partial\beta^T} = -\sum_{i=1}^{N}{x_ix_i^Tp(x_i;\beta)(1-p(x_i;\beta))} \end{equation}
But is the following calculation it is only calculating $\dfrac{\partial^2\ell(\beta)}{\partial\beta_i^2}$ terms. But Hessian matrix should also contain $\dfrac{\partial^2\ell(\beta)}{\partial\beta_i\partial\beta_j}$ where $i\neq j$.
Please explain the reason for missing out these terms.
Topic matrix esl mathematics logistic-regression statistics
Category Data Science