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.
|
Constructor and Description |
---|
ApproximateNaiveMlnReasoner(long maxNumberOfSelectedInterpretations,
long maxNumberOfInterpretationsForModel)
Creates a new ApproximateNaiveMlnReasoner.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<HerbrandInterpretation,java.lang.Double> |
computeModel(MarkovLogicNetwork mln,
FolSignature signature)
Computes the model of the given MLN wrt.
|
protected double |
doQuery(MarkovLogicNetwork mln,
FolFormula query,
FolSignature signature)
Performs the actual querying.
|
computeWeight, numberOfGroundSatisfactions, query, query
private long maxNumberOfSelectedInterpretations
private long maxNumberOfInterpretationsForModel
public ApproximateNaiveMlnReasoner(long maxNumberOfSelectedInterpretations, long maxNumberOfInterpretationsForModel)
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.protected double doQuery(MarkovLogicNetwork mln, FolFormula query, FolSignature signature)
AbstractMlnReasoner
doQuery
in class AbstractMlnReasoner
mln
- an MLNquery
- a fol formula guaranteed to be ground.public java.util.Map<HerbrandInterpretation,java.lang.Double> computeModel(MarkovLogicNetwork mln, FolSignature signature)
mln
- some mlnquery
- some querysignature
- some signature