identity_quadratic

Module: identity_quadratic

Inheritance diagram for regreg.identity_quadratic:

digraph inheritance5ebd16c831 { rankdir=LR; size="8.0, 12.0"; "regreg.identity_quadratic.identity_quadratic" [URL="#regreg.identity_quadratic.identity_quadratic",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="This object is a quadratic function"]; }

This module contains a single class that is meant to represent a quadratic of the form

\[\frac{L}{2} \|x-\mu\|^2_2 + \langle \eta, x \rangle + \gamma\]

with \(L, \mu, \eta, \gamma\) = (coef, center, linear_term, constant_term).

identity_quadratic

class regreg.identity_quadratic.identity_quadratic(coef, center, linear_term, constant_term=0)

Bases: object

This object is a quadratic function

\[x \mapsto \frac{L}{2} \|x-\mu\|^2_2 + \langle \eta, x \rangle + \gamma\]

used in the proximal methods of all atoms.

__init__(coef, center, linear_term, constant_term=0)

Initialize self. See help(type(self)) for accurate signature.

collapsed()

Return an identity quadratic with center of 0, would be nice to have None, but there are some places we are still multiplying by -1

property conjugate
get_shapes()

Determine shape of any pieces and make sure they agree

property iszero
latexify(var='\\beta', idx='')
noneify()

replace zeros with nones

objective(x, mode='both')
objective_vars = {'offset': '\\alpha', 'shape': 'p', 'var': '\\beta'}
recenter(offset)
property true_center
zeroify()