jaxopt.projection.projection_halfspace

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

Projection onto a halfspace:

argminy ||xy||22subject toayb
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 same shape as x.