Class MlnExample2

java.lang.Object
org.tweetyproject.logics.mln.examples.MlnExample2

public class MlnExample2 extends Object
Provides examples of constructing Markov Logic Networks (MLNs) programmatically and demonstrates how to use coherence measures.

This class includes various examples, such as the "Nixon" scenarios, to show how to define MLNs and apply coherence measures using the TweetyProject libraries.

Author:
Matthias Thimm
  • Constructor Details

    • MlnExample2

      public MlnExample2()
      Default constructor for the MlnExample2 class.

      Initializes an instance of the MLN example class to demonstrate the construction and analysis of Markov Logic Networks.

  • Method Details

    • Nixon1

      Constructs the Nixon1 MLN example, which represents a scenario with Quakers, Republicans, and Pacifists with certain probabilities.
      Returns:
      a Pair containing the Markov Logic Network and its FolSignature
      Throws:
      ParserException - if there is an error during parsing
      IOException - if there is an I/O error
    • Nixon2

      Constructs the Nixon2 MLN example, which represents Nixon being both a Quaker, Republican, and President.
      Returns:
      a Pair containing the Markov Logic Network and its FolSignature
      Throws:
      ParserException - if there is an error during parsing
      IOException - if there is an I/O error
    • Nixon3

      Constructs the Nixon3 MLN example, which represents Reagan as an actor and president, with certain probabilities on roles.
      Returns:
      a Pair containing the Markov Logic Network and its FolSignature
      Throws:
      ParserException - if there is an error during parsing
      IOException - if there is an I/O error
    • main

      public static void main(String[] args) throws ParserException, IOException
      Main method to demonstrate the usage of coherence measures on different Nixon MLN examples.

      This method computes and prints the coherence value of several MLN examples using a MaxAggregator based coherence measure. It also demonstrates the merging of MLNs and computing the coherence of the merged network.

      Parameters:
      args - command-line arguments (not used in this example)
      Throws:
      ParserException - if there is an error during parsing
      IOException - if there is an I/O error