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.
|
Constructor and Description |
---|
SimulatedAnnealing() |
Modifier and Type | Method and Description |
---|---|
static SimulatedAnnealing.AnnealingSchedule |
exponentialSchedule(int iterations,
double startT,
double endT) |
static NetworkState |
getMaxAPosteriori(BayesianNetwork bayesNet,
int sampleCount) |
static NetworkState |
getMaxAPosteriori(BayesianNetwork bayesNet,
int sampleCount,
KeanuRandom random) |
static NetworkState |
getMaxAPosteriori(BayesianNetwork bayesNet,
int sampleCount,
SimulatedAnnealing.AnnealingSchedule schedule) |
static NetworkState |
getMaxAPosteriori(BayesianNetwork bayesNet,
int sampleCount,
SimulatedAnnealing.AnnealingSchedule annealingSchedule,
KeanuRandom random)
Finds the MAP using the default annealing schedule, which is an exponential decay schedule.
|
public static NetworkState getMaxAPosteriori(BayesianNetwork bayesNet, int sampleCount, SimulatedAnnealing.AnnealingSchedule schedule)
public static NetworkState getMaxAPosteriori(BayesianNetwork bayesNet, int sampleCount, KeanuRandom random)
public static NetworkState getMaxAPosteriori(BayesianNetwork bayesNet, int sampleCount)
public static NetworkState getMaxAPosteriori(BayesianNetwork bayesNet, int sampleCount, SimulatedAnnealing.AnnealingSchedule annealingSchedule, KeanuRandom random)
bayesNet
- a bayesian network containing latent verticessampleCount
- the number of samples to takeannealingSchedule
- the schedule to update T (temperature) as a function of sample number.random
- the source of randomnesspublic 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