jaxopt.projection.projection_hyperplane

jaxopt.projection.projection_hyperplane(x, hyperparams)[source]

Projection onto a hyperplane:

\[\underset{y}{\text{argmin}} ~ ||x - y||_2^2 \quad \textrm{subject to} \quad a^\top y = b\]
Parameters
  • x (Array) – pytree to project.

  • hyperparams (Tuple) – tuple hyperparams = (a, b), where a is a pytree with the same structure as x and b is a scalar.

Return type

Array

Returns

output array, with the same shape as ``x`.