powered by
Where \(Dn = \{ 0 <= x <= 1, sum(x) = 1\}\). R translation of Loog's version of Xiaojing Ye's initial implementation. The algorithm works row-wise.
projection_simplex(y)
projection of y onto the simplex
matrix with vectors to be projected onto the simplex
Algorithm is explained in http://arxiv.org/abs/1101.6081