Class SampleVcpcFast

java.lang.Object
edu.cmu.tetrad.search.work_in_progress.SampleVcpcFast
All Implemented Interfaces:
IGraphSearch

public final class SampleVcpcFast extends Object implements IGraphSearch
Implements a conservative version of PC, in which the Markov condition is assumed but faithfulness is tested locally.
Version:
$Id: $Id
Author:
josephramsey (this version).
  • Constructor Details

    • SampleVcpcFast

      public SampleVcpcFast(IndependenceTest independenceTest)
      Constructs a CPC algorithm that uses the given independence test as oracle. This does not make a copy of the independence test, for fear of duplicating the data set!
      Parameters:
      independenceTest - a IndependenceTest object
  • Method Details

    • futureNodeVisit

      public static void futureNodeVisit(Graph graph, Node b, LinkedList<Node> path, Set<Node> futureNodes)

      futureNodeVisit.

      Parameters:
      graph - a Graph object
      b - a Node object
      path - a LinkedList object
      futureNodes - a Set object
    • isArrowheadAllowed1

      public static boolean isArrowheadAllowed1(Node from, Node to, Knowledge knowledge)

      isArrowheadAllowed1.

      Parameters:
      from - a Node object
      to - a Node object
      knowledge - a Knowledge object
      Returns:
      a boolean
    • getSemIm

      public SemIm getSemIm()

      Getter for the field semIm.

      Returns:
      a SemIm object
    • setSemIm

      public void setSemIm(SemIm semIm)

      Setter for the field semIm.

      Parameters:
      semIm - a SemIm object
    • isMeekPreventCycles

      public boolean isMeekPreventCycles()

      isMeekPreventCycles.

      Returns:
      true just in case edges will not be added if they would create cycles.
    • setMeekPreventCycles

      public void setMeekPreventCycles(boolean meekPreventCycles)
      Sets to true just in case edges will not be added if they would create cycles.
      Parameters:
      meekPreventCycles - a boolean
    • getElapsedTime

      public long getElapsedTime()

      Getter for the field elapsedTime.

      Returns:
      the elapsed time of search in milliseconds, after search() has been run.
    • getKnowledge

      public Knowledge getKnowledge()

      Getter for the field knowledge.

      Returns:
      the knowledge specification used in the search. Non-null.
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      Sets the knowledge specification used in the search. Non-null.
      Parameters:
      knowledge - a Knowledge object
    • getIndependenceTest

      public IndependenceTest getIndependenceTest()

      Getter for the field independenceTest.

      Returns:
      the independence test used in the search, set in the constructor. This is not returning a copy, for fear of duplicating the data set!
    • getDepth

      public int getDepth()

      Getter for the field depth.

      Returns:
      the depth of the search--that is, the maximum number of variables conditioned on in any conditional independence test.
    • setDepth

      public void setDepth(int depth)
      Sets the maximum number of variables conditioned on in any conditional independence test. If set to -1, the value of 1000 will be used. May not be set to Integer.MAX_VALUE, due to a Java bug on multi-core systems.
      Parameters:
      depth - a int
    • getAmbiguousTriples

      public Set<Triple> getAmbiguousTriples()

      Getter for the field ambiguousTriples.

      Returns:
      the set of ambiguous triples found during the most recent run of the algorithm. Non-null after a call to search().
    • getColliderTriples

      public Set<Triple> getColliderTriples()

      Getter for the field colliderTriples.

      Returns:
      the set of collider triples found during the most recent run of the algorithm. Non-null after a call to search().
    • getNoncolliderTriples

      public Set<Triple> getNoncolliderTriples()

      Getter for the field noncolliderTriples.

      Returns:
      the set of noncollider triples found during the most recent run of the algorithm. Non-null after a call to search().
    • getAdjacencies

      public Set<Edge> getAdjacencies()

      getAdjacencies.

      Returns:
      a Set object
    • getApparentNonadjacencies

      public Set<Edge> getApparentNonadjacencies()

      getApparentNonadjacencies.

      Returns:
      a Set object
    • getDefiniteNonadjacencies

      public Set<Edge> getDefiniteNonadjacencies()

      getDefiniteNonadjacencies.

      Returns:
      a Set object
    • search

      public Graph search()

      search.

      Specified by:
      search in interface IGraphSearch
      Returns:
      a Graph object
    • getCov

      public ICovarianceMatrix getCov()

      getCov.

      Returns:
      a ICovarianceMatrix object
    • isDoOrientation

      public boolean isDoOrientation()

      isDoOrientation.

      Returns:
      a boolean
    • getGraph

      public Graph getGraph()
      The graph that's constructed during the search.
      Returns:
      a Graph object
    • setGraph

      public void setGraph(Graph graph)

      Setter for the field graph.

      Parameters:
      graph - a Graph object
    • setVerbose

      public void setVerbose(boolean verbose)

      Setter for the field verbose.

      Parameters:
      verbose - a boolean
    • getSemPm

      public SemPm getSemPm()

      Getter for the field semPm.

      Returns:
      a SemPm object
    • setSemPm

      public void setSemPm(SemPm semPm)

      Setter for the field semPm.

      Parameters:
      semPm - a SemPm object