tfmri.math.project_onto_simplex
tfmri.math.project_onto_simplex¶
- project_onto_simplex(x, radius=1.0, name=None)[source]¶
Projects an input vector onto the simplex.
- Parameters
- Returns
A tf.Tensor of shape
[..., n]
and dtype equal tox.dtype
.- Raises
ValueError – If inputs are invalid.
References
- 1
Duchi, J., Shalev-Shwartz, S., Singer, Y., & Chandra, T. (2008). Efficient projections onto the l1-ball for learning in high dimensions. In Proceedings of the 25th International Conference on Machine Learning (pp. 272-279).