Home | Trees | Indices | Help |
---|
|
object --+ | properties.Function --+ | properties.AtomicFunction --+ | object --+ | | | properties.Penalty --+ | object --+ | | | properties.Constraint --+ | object --+ | | | properties.ProximalOperator --+ | object --+ | | | properties.ProjectionOperator --+ | LInf
The proximal operator of the L-infinity function f(x) = l * (||x||_inf - c), where ||x||_inf is the L-infinity loss function. The constrainted version has the form ||x||_inf <= c. Parameters ---------- l : Non-negative float. The Lagrange multiplier, or regularisation constant, of the function. c : Float. The limit of the constraint. The function is feasible if ||x||_inf <= c. The default value is c=0, i.e. the default is a regularisation formulation. penalty_start : Non-negative integer. The number of columns, variables etc., to be exempt from penalisation. Equivalently, the first index to be penalised. Default is 0, all columns are included.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
__abstractmethods__ =
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
Function value. From the interface "Function". Parameters ---------- x : Numpy array. The point at which to evaluate the function. Example ------- >>> import numpy as np >>> from parsimony.functions.penalties import LInf >>> import parsimony.utils.maths as maths >>> >>> np.random.seed(42) >>> x = np.random.rand(10, 1) >>> linf = LInf(l=1.1) >>> linf.f(x) - 1.1 * maths.normInf(x) 0.0
|
The corresponding proximal operator. From the interface "ProximalOperator". Examples -------- >>> import numpy as np >>> from parsimony.functions.penalties import LInf >>> import parsimony.utils.maths as maths >>> >>> np.random.seed(42) >>> x = np.random.rand(10, 1) >>> linf = LInf(l=1.45673045, c=0.5) >>> linf_prox = linf.prox(x) >>> linf_prox array([[ 0.37454012], [ 0.5 ], [ 0.5 ], [ 0.5 ], [ 0.15601864], [ 0.15599452], [ 0.05808361], [ 0.5 ], [ 0.5 ], [ 0.5 ]]) >>> linf_proj = linf.proj(x) >>> linf_proj array([[ 0.37454012], [ 0.5 ], [ 0.5 ], [ 0.5 ], [ 0.15601864], [ 0.15599452], [ 0.05808361], [ 0.5 ], [ 0.5 ], [ 0.5 ]]) >>> np.linalg.norm(linf_prox - linf_proj) 7.2392821740411278e-09
|
The corresponding projection operator. From the interface "ProjectionOperator". Examples -------- >>> import numpy as np >>> from parsimony.functions.penalties import LInf >>> >>> np.random.seed(42) >>> x = np.random.rand(10, 1) * 2.0 - 1.0 >>> linf = LInf(c=0.618) >>> linf.proj(x) array([[-0.25091976], [ 0.618 ], [ 0.46398788], [ 0.19731697], [-0.618 ], [-0.618 ], [-0.618 ], [ 0.618 ], [ 0.20223002], [ 0.41614516]])
|
Feasibility of the constraint. From the interface "Constraint". Parameters ---------- x : Numpy array. The variable to check for feasibility. Examples -------- >>> import numpy as np >>> from parsimony.functions.penalties import LInf >>> >>> np.random.seed(42) >>> x = np.random.rand(10, 1) * 2.0 - 1.0 >>> linf = LInf(c=0.618) >>> linf.feasible(x) False >>> linf.feasible(linf.proj(x)) True
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Apr 6 23:52:11 2015 | http://epydoc.sourceforge.net |