Commit 239abe45 authored by Jakob Knollmüller's avatar Jakob Knollmüller
Browse files

rename EnergyAdapter to PointKL

parent e635e62c
Pipeline #94914 failed with stages
in 31 seconds
......@@ -102,7 +102,7 @@ def main():
# Compute MAP solution by minimizing the information Hamiltonian
H = ift.StandardHamiltonian(likelihood)
initial_position = ift.from_random(domain, 'normal')
H = ift.EnergyAdapter(initial_position, H, want_metric=True)
H = ift.PointKL(initial_position, H, want_metric=True)
H, convergence = minimizer(H)
# Plotting
......
......@@ -75,7 +75,7 @@ def main():
# plt.close()
pos = ift.from_random(ham.domain, 'normal')
MAP = ift.EnergyAdapter(pos, ham, want_metric=True)
MAP = ift.PointKL(pos, ham, want_metric=True)
minimizer = ift.NewtonCG(
ift.GradientNormController(iteration_limit=20, name='Mini'))
minimizer_mf = ift.ADVIOptimizer(10)
......
......@@ -106,7 +106,7 @@ def main():
IC = ift.DeltaEnergyController(tol_rel_deltaE=1e-12, iteration_limit=200)
likelihood = ift.GaussianEnergy(d, N) @ R
Ham = ift.StandardHamiltonian(likelihood, IC)
H = ift.EnergyAdapter(params, Ham, want_metric=True)
H = ift.PointKL(params, Ham, want_metric=True)
# Minimize
minimizer = ift.NewtonCG(IC)
......
......@@ -71,7 +71,7 @@ from .minimization.stochastic_minimizer import ADVIOptimizer
from .minimization.scipy_minimizer import L_BFGS_B
from .minimization.energy import Energy
from .minimization.quadratic_energy import QuadraticEnergy
from .minimization.energy_adapter import EnergyAdapter
from .minimization.point_kl import PointKL
from .minimization.gaussian_kl import MetricGaussianKL, ParametricGaussianKL
from .sugar import *
......
......@@ -22,7 +22,7 @@ from ..minimization.energy import Energy
from ..sugar import makeDomain
class EnergyAdapter(Energy):
class PointKL(Energy):
"""Helper class which provides the traditional Nifty Energy interface to
Nifty operators with a scalar target domain.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment