nifty.cl.operators.simplify_for_const module#
- class ConstantEnergyOperator(output)[source]#
Bases:
EnergyOperatorOperator which has a scalar domain as target domain.
It is intended as an objective function for field inference. It can implement a positive definite, symmetric form (called metric) that is used as curvature for second-order minimizations.
Examples
Information Hamiltonian, i.e. negative-log-probabilities.
Gibbs free energy, i.e. an averaged Hamiltonian, aka Kullback-Leibler divergence.
- apply(x)[source]#
Applies the operator to a Field, MultiField or Linearization.
- Parameters:
x (
nifty.cl.field.Field,nifty.cl.multi_field.MultiField,) – ornifty.cl.linearization.LinearizationInput on which the operator shall act. Needs to be defined ondomain. If x`is a :class:`nifty.cl.linearization.Linearization, apply returns a newnifty.cl.linearization.Linearizationcontining the result of the operator application as well as its Jacobian, evaluated at x.
- class ConstantLikelihoodEnergyOperator(output)[source]#
Bases:
LikelihoodEnergyOperatorRepresent a negative log-likelihood.
The input to the Operator are the parameters of the negative log-likelihood. Unlike a general EnergyOperator, the metric of a LikelihoodEnergyOperator is the Fisher information metric of the likelihood.
- class ConstantOperator(output, domain={})[source]#
Bases:
OperatorTransforms values defined on one domain into values defined on another domain, and can also provide the Jacobian.
- apply(x)[source]#
Applies the operator to a Field, MultiField or Linearization.
- Parameters:
x (
nifty.cl.field.Field,nifty.cl.multi_field.MultiField,) – ornifty.cl.linearization.LinearizationInput on which the operator shall act. Needs to be defined ondomain. If x`is a :class:`nifty.cl.linearization.Linearization, apply returns a newnifty.cl.linearization.Linearizationcontining the result of the operator application as well as its Jacobian, evaluated at x.
- class InsertionOperator(target, cst_field)[source]#
Bases:
OperatorTransforms values defined on one domain into values defined on another domain, and can also provide the Jacobian.
- apply(x)[source]#
Applies the operator to a Field, MultiField or Linearization.
- Parameters:
x (
nifty.cl.field.Field,nifty.cl.multi_field.MultiField,) – ornifty.cl.linearization.LinearizationInput on which the operator shall act. Needs to be defined ondomain. If x`is a :class:`nifty.cl.linearization.Linearization, apply returns a newnifty.cl.linearization.Linearizationcontining the result of the operator application as well as its Jacobian, evaluated at x.