Skip to content
nonconvexcard

Projection onto the probability simplex

ProofAdvanced⏱ 1 hourAdvanced Optimizationprojectionsimplexkktalgorithm

Problem

Derive an algorithm computing ΠΔ(v)=arg⁡min⁡{∥z−v∥2:z≥0, ∑izi=1}\Pi_\Delta(v) = \arg\min\{\|z-v\|_2 : z\ge0,\ \sum_iz_i=1\} and show it runs in O(dlog⁡d)O(d\log d) time. State the closed form of the solution in terms of a threshold.

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

Hints

Hints — 0 of 3 revealed

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
Least squares as orthogonal projectionClassical MLProofFoundation15 min
The proximal operator of the l1 normAdvanced OptimizationProofBeginner15 min
Characterising orthogonal projectorsFoundationsProofIntermediate30 min
Complementary slackness and active constraintsAdvanced OptimizationProofIntermediate30 min
Conditional expectation minimises mean squared errorProbabilityProofIntermediate30 min