The input vector is projected onto the standard simplex, i.e. the set of vectors of the same length as the input vector with non-negative entries that sum to 1.
Usage
PiW(v)
Arguments
v
Input vector
Value
A vector in the standard simplex that is closest to the input vector is returned.
Details
This is an auxiliary function used by the InspectChangepoint package.
References
Chen, Y. and Ye, X. (2011) Projection onto a simplex. arXiv preprint, arxiv:1101.6081.