Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
39a06b44
Commit
39a06b44
authored
Jan 24, 2019
by
Philipp Arras
Browse files
Options
Downloads
Patches
Plain Diff
Docs
parent
6b5818dc
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
nifty5/library/inverse_gamma_operator.py
+1
-1
1 addition, 1 deletion
nifty5/library/inverse_gamma_operator.py
nifty5/operators/energy_operators.py
+13
-14
13 additions, 14 deletions
nifty5/operators/energy_operators.py
with
14 additions
and
15 deletions
nifty5/library/inverse_gamma_operator.py
+
1
−
1
View file @
39a06b44
...
...
@@ -26,7 +26,7 @@ from ..sugar import makeOp
class
InverseGammaOperator
(
Operator
):
"""
Operator which t
ransforms a Gaussian into an inverse gamma distribution.
"""
T
ransforms a Gaussian into an inverse gamma distribution.
The pdf of the inverse gamma distribution is defined as follows:
...
...
...
...
This diff is collapsed.
Click to expand it.
nifty5/operators/energy_operators.py
+
13
−
14
View file @
39a06b44
...
...
@@ -95,7 +95,7 @@ class QuadraticFormOperator(EnergyOperator):
class
GaussianEnergy
(
EnergyOperator
):
"""
C
lass for energies of fields with Gaussian probability distributio
n.
"""
C
omputes a negative-log Gaussia
n.
Represents up to constants in :math:`m`:
...
...
@@ -162,8 +162,8 @@ class GaussianEnergy(EnergyOperator):
class
PoissonianEnergy
(
EnergyOperator
):
"""
C
lass for
likelihood Hamiltonians of expected count field constrained
by
Poissonian count data.
"""
C
omputes
likelihood Hamiltonians of expected count field constrained
by
Poissonian count data.
Represents up to an f-independent term :math:`log(d!)`:
...
...
@@ -200,8 +200,7 @@ class PoissonianEnergy(EnergyOperator):
class
InverseGammaLikelihood
(
EnergyOperator
):
"""
This describes the negative log-likelihood of the inverse
gamma distribution.
"""
Computes the negative log-likelihood of the inverse gamma distribution.
It negative log-pdf(x) is given by
...
...
@@ -341,7 +340,7 @@ class StandardHamiltonian(EnergyOperator):
class
AveragedEnergy
(
EnergyOperator
):
"""
Averages an energy over samples
"""
Averages an energy over samples
.
Parameters
----------
...
...
@@ -351,15 +350,15 @@ class AveragedEnergy(EnergyOperator):
Set of residual sample points to be added to mean field for
approximate estimation of the KL.
Note
----
Having symmetrized residual samples, with both v_i and -v_i being
present, ensures that the distribution mean is exactly represented.
Notes
-----
- Having symmetrized residual samples, with both :math:`v_i` and
:math:`-v_i` being present, ensures that the distribution mean is
exactly represented.
:class:`AveragedEnergy(h)` approximates
:math:`
\\
left< H(f)
\\
right>_{G(f-m,D)}` if the residuals
:math:`f-m` are drawn from a Gaussian distribution with covariance
:math:`D`.
- :class:`AveragedEnergy(h)` approximates
:math:`
\\
left< H(f)
\\
right>_{G(f-m,D)}` if the residuals :math:`f-m`
are drawn from a Gaussian distribution with covariance :math:`D`.
"""
def
__init__
(
self
,
h
,
res_samples
):
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment