public class SimulatedAnnealing
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SimulatedAnnealing.AnnealingSchedule
An annealing schedule determines how T (temperature) changes as
a function of the current iteration number (i.e.
|
static class |
SimulatedAnnealing.SimulatedAnnealingBuilder |
| Constructor and Description |
|---|
SimulatedAnnealing() |
| Modifier and Type | Method and Description |
|---|---|
static SimulatedAnnealing.SimulatedAnnealingBuilder |
builder() |
static SimulatedAnnealing.AnnealingSchedule |
exponentialSchedule(int iterations,
double startT,
double endT) |
NetworkState |
getMaxAPosteriori(ProbabilisticModel model,
int sampleCount) |
NetworkState |
getMaxAPosteriori(ProbabilisticModel model,
int sampleCount,
SimulatedAnnealing.AnnealingSchedule annealingSchedule)
Finds the MAP using the default annealing schedule, which is an exponential decay schedule.
|
public static SimulatedAnnealing.SimulatedAnnealingBuilder builder()
public NetworkState getMaxAPosteriori(ProbabilisticModel model, int sampleCount)
public NetworkState getMaxAPosteriori(ProbabilisticModel model, int sampleCount, SimulatedAnnealing.AnnealingSchedule annealingSchedule)
model - a probabilistic model containing latent variablessampleCount - the number of samples to takeannealingSchedule - the schedule to update T (temperature) as a function of sample number.public static SimulatedAnnealing.AnnealingSchedule exponentialSchedule(int iterations, double startT, double endT)
iterations - the number of iterations annealing overstartT - the value of T at iteration 0endT - the value of T at the last iteration