Class SimpleSamplingMlnReasoner

  • All Implemented Interfaces:
    net.sf.tweety.commons.QuantitativeReasoner<MarkovLogicNetwork,​net.sf.tweety.logics.fol.syntax.FolFormula>, net.sf.tweety.commons.Reasoner<Double,​MarkovLogicNetwork,​net.sf.tweety.logics.fol.syntax.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
    • Constructor Detail

      • SimpleSamplingMlnReasoner

        public SimpleSamplingMlnReasoner​(double precision,
                                         int numOfPositiveTests)
        Creates a new SimpleSamplingMlnReasoner for the given Markov logic network.
        Parameters:
        precision - the precision
        numOfPositiveTests - the number of positive consecutive tests on precision
    • Method Detail

      • doQuery

        protected double doQuery​(MarkovLogicNetwork mln,
                                 net.sf.tweety.logics.fol.syntax.FolFormula query,
                                 net.sf.tweety.logics.fol.syntax.FolSignature signature)
        Description copied from class: AbstractMlnReasoner
        Performs the actual querying.
        Specified by:
        doQuery in class AbstractMlnReasoner
        Parameters:
        mln - an MLN
        query - a fol formula guaranteed to be ground.
        signature - the signature
        Returns:
        the answer of the query.