public class Hamiltonian extends java.lang.Object implements PosteriorSamplingAlgorithm
Algorithm 1: "Hamiltonian Monte Carlo". The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo https://arxiv.org/pdf/1111.4246.pdf
Constructor and Description |
---|
Hamiltonian() |
Modifier and Type | Method and Description |
---|---|
NetworkSamples |
getPosteriorSamples(BayesianNetwork bayesNet,
java.util.List<? extends Vertex> fromVertices,
int sampleCount)
Sample from the posterior of a Bayesian Network using the Hamiltonian Monte Carlo algorithm
|
static Hamiltonian |
withDefaultConfig() |
static Hamiltonian |
withDefaultConfig(KeanuRandom random) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPosteriorSamples
public static Hamiltonian withDefaultConfig()
public static Hamiltonian withDefaultConfig(KeanuRandom random)
public NetworkSamples getPosteriorSamples(BayesianNetwork bayesNet, java.util.List<? extends Vertex> fromVertices, int sampleCount)
getPosteriorSamples
in interface PosteriorSamplingAlgorithm
bayesNet
- The bayesian network to sample fromfromVertices
- the vertices to sample fromsampleCount
- the number of samples to take