Skip to content
nonconvexcard

Convexity of the logistic loss

ProofBeginner⏱ 15 minClassical MLlogisticconvexityhessian

Problem

Show the logistic negative log-likelihood has gradient X⊤(p−y)X^\top(p-y) and Hessian X⊤SXX^\top SX with S=diag⁡(pi(1−pi))S = \operatorname{diag}(p_i(1-p_i)), hence is convex. Determine exactly when it is strictly convex.

Write a complete argument. Every inequality you use should be one you could state precisely.

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
Equality in Jensen's inequalityFoundationsProofBeginner15 min
Every norm is convex, and the operator norm is a supremum of linear functionsOptimizationProofBeginner15 min
First-order characterisation of convexityOptimizationProofBeginner30 min
In-sample calibration of logistic regressionClassical MLProofIntermediate30 min
IRLS is a weighted least-squares solveClassical MLProofIntermediate30 min