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

View source: R/MCPLDA.R

projection_simplexR Documentation

Project an n-dim vector y to the simplex Dn

Description

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.

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 in http://arxiv.org/abs/1101.6081


jkrijthe/RSSL documentation built on Jan. 13, 2024, 1:56 a.m.