Class SimpleSamplingMlnReasoner
- java.lang.Object
-
- net.sf.tweety.logics.mln.reasoner.AbstractMlnReasoner
-
- net.sf.tweety.logics.mln.reasoner.SimpleSamplingMlnReasoner
-
- All Implemented Interfaces:
QuantitativeReasoner<MarkovLogicNetwork,FolFormula>,Reasoner<java.lang.Double,MarkovLogicNetwork,FolFormula>
public class SimpleSamplingMlnReasoner extends AbstractMlnReasoner
This MLN reasoner employs simple random sampling from the set of interpretations to compute the probability of a formula.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private intnumOfPositiveTestsprivate doubleprecisionThe computation is aborted when the given precision is reached for at least numOfPositive number of consecutive tests.
-
Constructor Summary
Constructors Constructor Description SimpleSamplingMlnReasoner(double precision, int numOfPositiveTests)Creates a new SimpleSamplingMlnReasoner for the given Markov logic network.
-
Method Summary
Modifier and Type Method Description protected doubledoQuery(MarkovLogicNetwork mln, FolFormula query, FolSignature signature)Performs the actual querying.-
Methods inherited from class net.sf.tweety.logics.mln.reasoner.AbstractMlnReasoner
computeWeight, numberOfGroundSatisfactions, query, query
-
-
-
-
Constructor Detail
-
SimpleSamplingMlnReasoner
public SimpleSamplingMlnReasoner(double precision, int numOfPositiveTests)Creates a new SimpleSamplingMlnReasoner for the given Markov logic network.- Parameters:
precision- the precisionnumOfPositiveTests- the number of positive consecutive tests on precision
-
-
Method Detail
-
doQuery
protected double doQuery(MarkovLogicNetwork mln, FolFormula query, FolSignature signature)
Description copied from class:AbstractMlnReasonerPerforms the actual querying.- Specified by:
doQueryin classAbstractMlnReasoner- Parameters:
mln- an MLNquery- a fol formula guaranteed to be ground.signature- the signature- Returns:
- the answer of the query.
-
-