Learn R Programming

RSSL (version 0.9.3)

projection_simplex: project an n-dim vector y to the simplex Dn

Description

Dn = x : x n-dim, 1 >= x >= 0, sum(x) = 1 R translation of Loog's version of Xiaojing Ye's initial implementation. The algorithm works row-wise

Usage

projection_simplex(y)

Arguments

y

matrix with vectors to be projected onto the simplex

Value

projection of y onto the simplex

References

Algorithm is explained as in http://arxiv.org/abs/1101.6081