Class ProbabilisticMapIndependence

java.lang.Object
edu.cmu.tetrad.search.work_in_progress.ProbabilisticMapIndependence
All Implemented Interfaces:
IndependenceTest

public class ProbabilisticMapIndependence extends Object implements IndependenceTest
Uses BCInference by Cooper and Bui to calculate probabilistic conditional independence judgments.
Version:
$Id: $Id
Author:
josephramsey 3/2014
  • Constructor Details

    • ProbabilisticMapIndependence

      public ProbabilisticMapIndependence(DataSet dataSet)
      Initializes the test using a discrete data sets.
      Parameters:
      dataSet - a DataSet object
  • Method Details

    • indTestSubset

      public IndependenceTest indTestSubset(List<Node> vars)
      Returns an Independence test for a sublist of the variables.
      Specified by:
      indTestSubset in interface IndependenceTest
      Parameters:
      vars - The sublist of variables.
      Returns:
      a IndependenceTest object
    • checkIndependence

      public IndependenceResult checkIndependence(Node x, Node y, Set<Node> _z)
      Checks the independence between two variables x and y given a conditioning set z.
      Specified by:
      checkIndependence in interface IndependenceTest
      Parameters:
      x - The first variable to test, represented as a Node object.
      y - The second variable to test, represented as a Node object.
      _z - The set of conditioning variables, represented as a Set of Node objects.
      Returns:
      An IndependenceResult object representing the outcome of the independence test.
    • checkIndependence

      public IndependenceResult checkIndependence(Node x, Node y, Node... z)
      Checks the independence fact in question and returns and independence result.
      Specified by:
      checkIndependence in interface IndependenceTest
      Parameters:
      x - a Node object
      y - a Node object
      z - a Node object
      Returns:
      The independence result.
      See Also:
    • probConstraint

      public double probConstraint(BCInference.OP op, Node x, Node y, Node[] z)

      probConstraint.

      Parameters:
      op - a BCInference.OP object
      x - a Node object
      y - a Node object
      z - an array of Node objects
      Returns:
      a double
    • getVariables

      public List<Node> getVariables()
      Retrieves the list of variables associated with this independence test.
      Specified by:
      getVariables in interface IndependenceTest
      Returns:
      A list of Node objects representing the variables.
    • getVariable

      public Node getVariable(String name)
      Returns The variable by the given name.
      Specified by:
      getVariable in interface IndependenceTest
      Parameters:
      name - a String object
      Returns:
      This variable.
    • determines

      public boolean determines(Set<Node> z, Node y)
      Returns true if y is determined the variable in z.
      Specified by:
      determines in interface IndependenceTest
      Parameters:
      z - a Set object
      y - a Node object
      Returns:
      True, if so.
    • getAlpha

      public double getAlpha()
      Returns the significance level of the independence test.
      Specified by:
      getAlpha in interface IndependenceTest
      Returns:
      This level.
    • setAlpha

      public void setAlpha(double alpha)
      Sets the significance level.
      Specified by:
      setAlpha in interface IndependenceTest
      Parameters:
      alpha - This level.
    • getData

      public DataModel getData()
      Retrieves the data model associated with this test.
      Specified by:
      getData in interface IndependenceTest
      Returns:
      A DataModel object representing the data model.
    • getH

      public Map<IndependenceFact,Double> getH()

      getH.

      Returns:
      a Map object
    • getPosterior

      public double getPosterior()

      Getter for the field posterior.

      Returns:
      a double
    • isVerbose

      public boolean isVerbose()
      Returns true if the test prints verbose output.
      Specified by:
      isVerbose in interface IndependenceTest
      Returns:
      True if the case.
    • setVerbose

      public void setVerbose(boolean verbose)
      Sets whether this test will print verbose output.
      Specified by:
      setVerbose in interface IndependenceTest
      Parameters:
      verbose - True, if so.