Source: Annotated lecture PDF · Review roadmap
Positive definite and positive semidefinite matrices
For real symmetric :
Equivalently, eigenvalues are all positive / all nonnegative. This concerns a quadratic form, not the signs of individual entries. If , its inverse exists and is positive definite.
Stationary points and minima
Unconstrained optimisation: . Constraints restrict the feasible region. In model training, parameters are decision variables; training data are fixed.
- Local minimum: in a neighbourhood of .
- Global minimum: this holds throughout the domain.
- Stationary point: .
For a differentiable unconstrained local minimum, stationarity is necessary, not sufficient. For differentiable convex on , stationarity is sufficient for a global minimum.
HW1 supplement — second-order classification: for functions, evaluate at a stationary point:
| Hessian | Conclusion |
|---|---|
| Positive definite | Strict local minimum |
| Negative definite | Strict local maximum |
| Indefinite (positive and negative eigenvalues) | Saddle point |
| Semidefinite with zero eigenvalues | Test may be inconclusive |
A local minimum necessarily has a positive semidefinite Hessian. Local curvature alone does not establish global optimality.
Least squares
Rows of are feature vectors; include a column of ones for an intercept.
Normal equations and solution:
The inverse formula and uniqueness require full column rank. Without it, the objective remains convex but minimisers need not be unique.
Logistic regression: from likelihood to loss
For :
Independent observations justify the product. Maximising is equivalent to maximising and minimising negative average log-likelihood:
Log turns products into sums, avoiding multiplication of tiny probabilities. Unlike least squares, the stationarity equations generally need an iterative solution.
Gradient descent
A descent direction decreases the objective for every sufficiently small positive step. A sufficient condition is .
With fixed , movement length is . A downhill direction still needs a suitable step size.
Stop when or a computation/iteration limit is reached. A small gradient indicates approximate stationarity. Initialisation matters for nonconvex problems; compare total runtime as well as iteration count.
- Line search: choose direction, then distance.
- Trust region: choose a radius, then optimise a local model within it.
Connections
- L1 supplies slope and curvature for optimisation.
- L3 chooses the step size and adds history to GD.
- L4 replaces full gradients with noisy estimates or uses Hessian information.
- L6: prediction versus causation: fitting a predictive relationship does not establish an intervention effect.
For examples: stationary points, pp. 7–8 · regression, pp. 9–15 · GD and frameworks, pp. 17–26.