jaxopt.projection.projection_polyhedron

jaxopt.projection.projection_polyhedron(x, hyperparams, check_feasible=True)[source]

Projection onto a polyhedron:

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

  • hyperparams (Tuple) – tuple hyperparams = (A, b, G, h), where A is a matrix, b is a vector, G is a matrix and h is a vector.

  • check_feasible – if True (default: True) check the non emptyness of the polyhedron, which disables jit compilation. If False, the function is jit compiled.

Return type

Array

Returns

output array, with the same shape as x.