public class BayesInferenceApproxAdapter extends java.lang.Object implements BayesInference
| Constructor and Description |
|---|
BayesInferenceApproxAdapter(BayesSampleInference adaptee) |
BayesInferenceApproxAdapter(BayesSampleInference adaptee,
int N) |
| Modifier and Type | Method and Description |
|---|---|
CategoricalDistribution |
ask(RandomVariable[] X,
AssignmentProposition[] observedEvidence,
BayesianNetwork bn) |
BayesSampleInference |
getAdaptee() |
int |
getN() |
void |
setAdaptee(BayesSampleInference adaptee) |
void |
setN(int n) |
public BayesInferenceApproxAdapter(BayesSampleInference adaptee)
public BayesInferenceApproxAdapter(BayesSampleInference adaptee, int N)
public int getN()
public void setN(int n)
n - the numver of samples to be generated when calling the
BayesSampleInference adaptee.public BayesSampleInference getAdaptee()
public void setAdaptee(BayesSampleInference adaptee)
adaptee - the BayesSampleInference implementation be be apated to the
BayesInference API.public CategoricalDistribution ask(RandomVariable[] X, AssignmentProposition[] observedEvidence, BayesianNetwork bn)
ask in interface BayesInferenceX - the query variables.observedEvidence - observed values for variables E.bn - a Bayes net with variables {X} ∪ E ∪ Y /* Y = hidden
variables