Home | Trees | Indices | Help |
---|
|
object --+ | properties.Function --+ | properties.CompositeFunction --+ | object --+ | | | properties.Gradient --+ | object --+ | | | properties.LipschitzContinuousGradient --+ | object --+ | | | properties.StepSize --+ | LinearFunction
A linear function.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from |
|
|||
__abstractmethods__ =
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Parameters ---------- a : Numpy array (p-by-1). The slope.
|
Free any cached computations from previous use of this Function. From the interface "Function".
|
Function value. From the interface "Function". Parameters ---------- beta : Numpy array. Regression coefficient vector. The point at which to evaluate the function.
|
Gradient of the function at beta. From the interface "Gradient". Parameters ---------- x : The point at which to evaluate the gradient.
|
Lipschitz constant of the gradient. From the interface "LipschitzContinuousGradient". Examples -------- >>> import numpy as np >>> from parsimony.functions.losses import LinearFunction >>> >>> np.random.seed(42) >>> a = np.random.rand(10, 15) >>> f = LinearFunction(a) >>> L = f.L() >>> L_ = f.approx_L((15, 1), 10) >>> L >= L_ True >>> L - L_ 0.0
|
The step size to use in descent methods.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Apr 6 23:52:11 2015 | http://epydoc.sourceforge.net |