Class ZhangShenBoundTest

java.lang.Object
edu.cmu.tetrad.search.ZhangShenBoundTest
All Implemented Interfaces:
Score

public class ZhangShenBoundTest extends Object implements Score
Implements the continuous BIC score for FGES.
Author:
Joseph Ramsey
  • Constructor Details

    • ZhangShenBoundTest

      public ZhangShenBoundTest(ICovarianceMatrix covariances)
      Constructs the score using a covariance matrix.
    • ZhangShenBoundTest

      public ZhangShenBoundTest(DataSet dataSet)
      Constructs the score using a covariance matrix.
  • Method Details

    • localScoreDiff

      public double localScoreDiff(int x, int y, int[] z)
      Specified by:
      localScoreDiff in interface Score
    • localScoreDiff

      public double localScoreDiff(int x, int y)
      Specified by:
      localScoreDiff in interface Score
    • localScore

      public double localScore(int i, int... parents) throws RuntimeException
      Specified by:
      localScore in interface Score
      Parameters:
      i - The index of the node.
      parents - The indices of the node's parents.
      Returns:
      The score, or NaN if the score cannot be calculated.
      Throws:
      RuntimeException
    • getVarRy

      public static double getVarRy(int i, int[] parents, Matrix data, ICovarianceMatrix covariances, boolean calculateRowSubsets, boolean calculateSquareEuclideanNorms)
    • zhangShenLambda

      public static double zhangShenLambda(int pn, int m0, double riskBound)
    • getP

      public static double getP(int pn, int m0, double lambda)
    • bStar

      @NotNull public static @NotNull Matrix bStar(Matrix b)
    • localScore

      public double localScore(int i, int parent)
      Specialized scoring method for a single parent. Used to speed up the effect edges search.
      Specified by:
      localScore in interface Score
    • localScore

      public double localScore(int i)
      Specialized scoring method for no parents. Used to speed up the effect edges search.
      Specified by:
      localScore in interface Score
    • getCovariances

      public ICovarianceMatrix getCovariances()
    • getSampleSize

      public int getSampleSize()
      Specified by:
      getSampleSize in interface Score
    • isEffectEdge

      public boolean isEffectEdge(double bump)
      Specified by:
      isEffectEdge in interface Score
    • isVerbose

      public boolean isVerbose()
    • setVerbose

      public void setVerbose(boolean verbose)
    • getVariables

      public List<Node> getVariables()
      Specified by:
      getVariables in interface Score
    • getVariable

      public Node getVariable(String targetName)
      Specified by:
      getVariable in interface Score
    • getMaxDegree

      public int getMaxDegree()
      Specified by:
      getMaxDegree in interface Score
    • determines

      public boolean determines(List<Node> z, Node y)
      Specified by:
      determines in interface Score
    • setCalculateSquaredEuclideanNorms

      public void setCalculateSquaredEuclideanNorms(boolean calculateSquaredEuclideanNorms)
    • isChanged

      public boolean isChanged()
    • setChanged

      public void setChanged(boolean b)
    • setPenaltyDiscount

      public void setPenaltyDiscount(double penaltyDiscount)
    • getPenaltyDiscount

      public double getPenaltyDiscount()
    • setRiskBound

      public void setRiskBound(double riskBound)
    • setCorrelationThreshold

      public void setCorrelationThreshold(double correlationThreshold)
    • setTakeLog

      public void setTakeLog(boolean takeLog)
    • setTrueErrorVariance

      public void setTrueErrorVariance(double trueErrorVariance)