PiW | R Documentation |
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.
PiW(v)
v |
Input vector |
This is an auxiliary function used by the InspectChangepoint
package.
A vector in the standard simplex that is closest to the input vector is returned.
Chen, Y. and Ye, X. (2011) Projection onto a simplex. arXiv preprint, arxiv:1101.6081.
v <- rnorm(10) PiW(v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.