public class ApproximateNaiveMlnReasoner extends AbstractMlnReasoner
| Modifier and Type | Class and Description |
|---|---|
private class |
ApproximateNaiveMlnReasoner.WeightedHerbrandInterpretation
A Herbrand interpretation with an annotated weight.
|
| Modifier and Type | Field and Description |
|---|---|
private long |
maxNumberOfInterpretationsForModel
The maximum number of interpretations used for the model.
|
private long |
maxNumberOfSelectedInterpretations
The maximum number of interpretations selected from the whole
set of interpretations.
|
private ProbabilityDistribution<HerbrandInterpretation> |
prob
The approximated model of the MLN (saved for avoid double
computation).
|
| Constructor and Description |
|---|
ApproximateNaiveMlnReasoner(BeliefBase beliefBase,
FolSignature signature,
long maxNumberOfSelectedInterpretations,
long maxNumberOfInterpretationsForModel)
Creates a new ApproximateNaiveMlnReasoner for the given Markov logic network.
|
| Modifier and Type | Method and Description |
|---|---|
private ProbabilityDistribution<HerbrandInterpretation> |
computeModel()
Computes the model of the given MLN wrt.
|
protected double |
doQuery(FolFormula query)
Performs the actual querying.
|
void |
reset()
Resets this reasoner (removes cached files etc.)
|
computeWeight, getSignature, numberOfGroundSatisfactions, querygetKnowledgeBaseprivate ProbabilityDistribution<HerbrandInterpretation> prob
private long maxNumberOfSelectedInterpretations
private long maxNumberOfInterpretationsForModel
public ApproximateNaiveMlnReasoner(BeliefBase beliefBase, FolSignature signature, long maxNumberOfSelectedInterpretations, long maxNumberOfInterpretationsForModel)
beliefBase - a Markov logic network.signature - another signature (if the probability distribution should be defined
on that one (that one should subsume the signature of the Markov logic network)maxNumberOfSelectedInterpretations - the maximum number of interpretations selected from the whole
set of interpretations. Is -1 if all interpretations are to be selected.maxNumberOfInterpretationsForModel - the maximum number of interpretations used for the model. Those interpretations
are the subset of the interpretations selected with maximum weight. Is -1
if all interpretations are used for the model. It has to be maxNumberOfSelectedInterpretations >= maxNumberOfInterpretationsForModel.public void reset()
AbstractMlnReasonerreset in class AbstractMlnReasonerprotected double doQuery(FolFormula query)
AbstractMlnReasonerdoQuery in class AbstractMlnReasonerquery - a fol formula guaranteed to be ground.private ProbabilityDistribution<HerbrandInterpretation> computeModel()