Class ApproximateNaiveMlnReasoner
java.lang.Object
org.tweetyproject.logics.mln.reasoner.AbstractMlnReasoner
org.tweetyproject.logics.mln.reasoner.ApproximateNaiveMlnReasoner
- All Implemented Interfaces:
QuantitativeReasoner<MarkovLogicNetwork,
,FolFormula> Reasoner<Double,
MarkovLogicNetwork, FolFormula>
This reasoner performs approximate reasoning with MLNs by considering
only a subset of all Herbrand interpretations. This subset is chosen
by first randomly selecting a set of Herbrand interpretations
and then selecting the subset of this set with maximum weights.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorDescriptionApproximateNaiveMlnReasoner
(long maxNumberOfSelectedInterpretations, long maxNumberOfInterpretationsForModel) Creates a new ApproximateNaiveMlnReasoner. -
Method Summary
Modifier and TypeMethodDescriptioncomputeModel
(MarkovLogicNetwork mln, FolSignature signature) Computes the model of the given MLN wrt.boolean
Methods inherited from class org.tweetyproject.logics.mln.reasoner.AbstractMlnReasoner
query, query
-
Constructor Details
-
ApproximateNaiveMlnReasoner
public ApproximateNaiveMlnReasoner(long maxNumberOfSelectedInterpretations, long maxNumberOfInterpretationsForModel) Creates a new ApproximateNaiveMlnReasoner.- Parameters:
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.
-
-
Method Details
-
computeModel
public Map<HerbrandInterpretation,Double> computeModel(MarkovLogicNetwork mln, FolSignature signature) Computes the model of the given MLN wrt. the optimization parameters- Parameters:
mln
- some mlnsignature
- some signature- Returns:
- the model of the given MLN wrt. the optimization parameters.
-
isInstalled
public boolean isInstalled()- Returns:
- if reasoner is installed
-