Package PyDSTool :: Package Toolbox :: Package optimizers :: Package helpers :: Module quadratic :: Class Quadratic
[hide private]
[frames] | no frames]

Class Quadratic

source code

object --+
         |
        Quadratic
Known Subclasses:

Defines a cost function with a quadratic cost

Instance Methods [hide private]
 
__init__(self, x, y, f)
Creates the function : - x is the parameters for the function - y is the data to approximate - f is an object function defining the gradient and the Hessian if needed It takes two parameters when called, the values x where the function should be computed and an array params that contains the parameters.
source code
 
__call__(self, params)
Computes the cost for the specified parameters
source code
 
gradient(self, params)
Computes the gradient of the function
source code
 
hessian(self, params)
Compute sthe hessian of the fit function
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, x, y, f)
(Constructor)

source code 

Creates the function :
- x is the parameters for the function
- y is the data to approximate
- f is an object function defining the gradient and the Hessian if needed
  It takes two parameters when called, the values x where the function should be computed and an array params that contains the parameters. The gradient of the function is the gradient for the parameters

Overrides: object.__init__