public class RejectionSampler
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double |
getPosteriorProbability(java.util.List<? extends Vertex> latentVertices,
java.util.List<? extends Vertex> observedVertices,
java.util.function.Supplier<java.lang.Boolean> isSuccess,
int sampleCount) |
static double |
getPosteriorProbability(java.util.List<? extends Vertex> latentVertices,
java.util.List<? extends Vertex> observedVertices,
java.util.function.Supplier<java.lang.Boolean> isSuccess,
int sampleCount,
KeanuRandom random) |
static NetworkSamples |
getPosteriorSamples(BayesianNetwork bayesNet,
java.util.List<Vertex<?>> fromVertices,
int sampleCount)
Samples from the posterior of a Bayesian Network using Rejection Sampling / Accept-Reject.
|
static NetworkSamples |
getPosteriorSamples(BayesianNetwork bayesNet,
java.util.List<Vertex<?>> fromVertices,
int sampleCount,
KeanuRandom random) |
public static double getPosteriorProbability(java.util.List<? extends Vertex> latentVertices, java.util.List<? extends Vertex> observedVertices, java.util.function.Supplier<java.lang.Boolean> isSuccess, int sampleCount)
public static double getPosteriorProbability(java.util.List<? extends Vertex> latentVertices, java.util.List<? extends Vertex> observedVertices, java.util.function.Supplier<java.lang.Boolean> isSuccess, int sampleCount, KeanuRandom random)
public static NetworkSamples getPosteriorSamples(BayesianNetwork bayesNet, java.util.List<Vertex<?>> fromVertices, int sampleCount)
bayesNet
- the bayesian network to sample fromfromVertices
- the vertices to sample fromsampleCount
- the number of samples to takepublic static NetworkSamples getPosteriorSamples(BayesianNetwork bayesNet, java.util.List<Vertex<?>> fromVertices, int sampleCount, KeanuRandom random)