jaxopt.projection.projection_non_negative
- jaxopt.projection.projection_non_negative(x, hyperparams=None)[source]
Projection onto the non-negative orthant:
\[\underset{p}{\text{argmin}} ~ ||x - p||_2^2 \quad \textrm{subject to} \quad p \ge 0\]- Parameters
x (
Any
) – pytree to project.hyperparams – ignored.
- Return type
Any
- Returns
projected pytree, with the same structure as
x
.