nifty8.operators.simplify_for_const module#

class ConstCollector[source]#

Bases: object

__init__()[source]#
add(const, fulldom)[source]#
property constfield#
mult(const, fulldom)[source]#
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.

__init__(output)[source]#
apply(x)[source]#

Applies the operator to a Field, MultiField or Linearization.

Parameters:

x (nifty8.field.Field, nifty8.multi_field.MultiField,) – or nifty8.linearization.Linearization Input on which the operator shall act. Needs to be defined on domain. If x`is a :class:`nifty8.linearization.Linearization, apply returns a new nifty8.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.

__init__(output)[source]#
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.

__init__(output, domain={})[source]#
__repr__()[source]#

Return repr(self).

apply(x)[source]#

Applies the operator to a Field, MultiField or Linearization.

Parameters:

x (nifty8.field.Field, nifty8.multi_field.MultiField,) – or nifty8.linearization.Linearization Input on which the operator shall act. Needs to be defined on domain. If x`is a :class:`nifty8.linearization.Linearization, apply returns a new nifty8.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.

__init__(target, cst_field)[source]#
__repr__()[source]#

Return repr(self).

apply(x)[source]#

Applies the operator to a Field, MultiField or Linearization.

Parameters:

x (nifty8.field.Field, nifty8.multi_field.MultiField,) – or nifty8.linearization.Linearization Input on which the operator shall act. Needs to be defined on domain. If x`is a :class:`nifty8.linearization.Linearization, apply returns a new nifty8.linearization.Linearization contining the result of the operator application as well as its Jacobian, evaluated at x.