Package parsimony :: Package datasets :: Package simulate :: Module grad :: Class L1
[hide private]
[frames] | no frames]

Class L1

source code

object --+    
         |    
  Function --+
             |
            L1

Nested Classes [hide private]

Inherited from Function: __metaclass__

Instance Methods [hide private]
 
__init__(self, l, rng=RandomUniform(-1,1))
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
grad(self, x)
Sub-gradient of the function
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, l, rng=RandomUniform(-1,1))
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

grad(self, x)

source code 
Sub-gradient of the function

    f(x) = |x|_1,

where |x|_1 is the L1-norm.

Overrides: Function.grad