nifty8.operators.simplify_for_const module#
- class ConstantEnergyOperator(output)[source]#
Bases:
EnergyOperator
Operator 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 (
nifty8.field.Field
,nifty8.multi_field.MultiField
,) – ornifty8.linearization.Linearization
Input on which the operator shall act. Needs to be defined ondomain
. If x`is a :class:`nifty8.linearization.Linearization, apply returns a newnifty8.linearization.Linearization
contining the result of the operator application as well as its Jacobian, evaluated at x.
- class ConstantLikelihoodEnergyOperator(output)[source]#
Bases:
LikelihoodEnergyOperator
Represent 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:
Operator
Transforms 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 (
nifty8.field.Field
,nifty8.multi_field.MultiField
,) – ornifty8.linearization.Linearization
Input on which the operator shall act. Needs to be defined ondomain
. If x`is a :class:`nifty8.linearization.Linearization, apply returns a newnifty8.linearization.Linearization
contining the result of the operator application as well as its Jacobian, evaluated at x.
- class InsertionOperator(target, cst_field)[source]#
Bases:
Operator
Transforms 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 (
nifty8.field.Field
,nifty8.multi_field.MultiField
,) – ornifty8.linearization.Linearization
Input on which the operator shall act. Needs to be defined ondomain
. If x`is a :class:`nifty8.linearization.Linearization, apply returns a newnifty8.linearization.Linearization
contining the result of the operator application as well as its Jacobian, evaluated at x.