tfmri.math.project_onto_ball
tfmri.math.project_onto_ball¶
- project_onto_ball(x, order=2, radius=1.0, name=None)[source]¶
Projects an input vector onto the Lp ball.
- Parameters
- Returns
A tf.Tensor of shape
[..., n]
and dtype equal tox.dtype
.- Raises
NotImplementedError –
If
order
is not1
,2
, or np.inf.ValueError – If inputs are invalid.
References
- 1
Parikh, N., & Boyd, S. (2014). Proximal algorithms. Foundations and Trends in optimization, 1(3), 127-239.
- 2
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).