FiniteDifferenceHessian¶
- class FiniteDifferenceHessian(*args)¶
Base class for second order centered finite-difference scheme.
- Available constructors:
FiniteDifferenceHessian(epsilon, evalImpl)
FiniteDifferenceHessian(step, evalImpl)
- Parameters:
- evalImpl
EvaluationImplementation
Implementation of the evaluation of a function.
- epsilonfloat, sequence of float
Finite difference steps for each dimension.
- step
FiniteDifferenceStep
Defines how finite difference steps values are computed.
- evalImpl
Notes
Base class to define second order finite-difference scheme. The hessian can be computed only through its derived class:
Methods
Accessor to the number of times the hessian has been called.
Accessor to the object's name.
Get the finite difference steps.
Get the implementation of the evaluation of the function.
Get the finite difference step.
Get the input dimension.
getMarginal
(*args)Accessor to the hessian implementation of a specific output.
getName
()Accessor to the object's name.
Get the output dimension.
Accessor to the parameter values.
hasName
()Test if the object is named.
hessian
(inP)Get the hessian at some point.
Accessor to the validity flag.
setFiniteDifferenceStep
(finiteDifferenceStep)Set the finite difference step.
setName
(name)Accessor to the object's name.
setParameter
(parameter)Accessor to the parameter values.
- __init__(*args)¶
- getCallsNumber()¶
Accessor to the number of times the hessian has been called.
- Returns:
- calls_numberint
Integer that counts the number of times the hessian has been called since its creation.
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getEpsilon()¶
Get the finite difference steps.
- Returns:
- epsilon
Point
Finite difference steps for each dimension.
- epsilon
- getEvaluation()¶
Get the implementation of the evaluation of the function.
- Returns:
- evalImpl
EvaluationImplementation
Implementation of the evaluation of a function.
- evalImpl
- getFiniteDifferenceStep()¶
Get the finite difference step.
- Returns:
- step
FiniteDifferenceStep
Defines how finite difference steps values are computed.
- step
- getInputDimension()¶
Get the input dimension.
- Returns:
- dimensionint
Input dimension.
- getMarginal(*args)¶
Accessor to the hessian implementation of a specific output.
- Parameters:
- iint
Integer corresponding to the output (Care: it starts at 0).
- indicessequence of integer
The set of indices for which the outputs are extracted.
- Returns:
- hessianImplementation
HessianImplementation
A hessian implementation restricted to its compenents functions which indices are i or indices.
- hessianImplementation
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getOutputDimension()¶
Get the output dimension.
- Returns:
- dimensionint
Output dimension.
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- hessian(inP)¶
Get the hessian at some point.
- Parameters:
- pointsequence of float
Point where the hessian is computed.
- Returns:
- hessian
SymmetricTensor
Hessian evaluated at point.
- hessian
- isActualImplementation()¶
Accessor to the validity flag.
- Returns:
- is_implbool
Whether the implementation is valid.
- setFiniteDifferenceStep(finiteDifferenceStep)¶
Set the finite difference step.
- Parameters:
- step
FiniteDifferenceStep
Defines how finite difference steps values are computed.
- step
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.
- setParameter(parameter)¶
Accessor to the parameter values.
- Parameters:
- parametersequence of float
The parameter values.
Examples using the class¶
Estimate moments from Taylor expansions