Class ZsbScore

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

public class ZsbScore extends Object implements Score

Implements an unpublished score based on a risk bound due to Zhang and Shen. It adapts Theorem 1 in the following reference:

Zhang, Y., & Shen, X. (2010). Model selection procedure for high‐dimensional data. Statistical Analysis and Data Mining: The ASA Data Science Journal, 3(5), 350-358

The score uses Theorem 1 in the above to numerically search for a lambda value that is bounded by a given probability risk, between 0 and 1, if outputting a local false positive parent for a variable. There is a parameter m0, which is a maximum number of parents for a particular variable, which is free. The solution of this score is to increase m0 from 0 upward, re-evaluating with each scoring that is done using that variable as a target node. Thus, over time, a lower bound on m0 is estimated with more and more precision. So as the score is used in the context of FGES or GRaSP, for instance, so long as the score for a given node is visited more than once, the scores output by the procedure can be expected to improve, though setting m0 to 0 for all variables does not give bad results even by itself.

This score is conservative for large, dense models and faster than other available scores in this package. The risk bound is easily interpreted.

As for all scores in Tetrad, higher scores mean more dependence, and negative scores indicate independence.

Author:
josephramsey
  • Constructor Details

    • ZsbScore

      public ZsbScore(ICovarianceMatrix covMatrix)
      Constructs the score using a covariance matrix.
      Parameters:
      covMatrix - The covariance matrix.
    • ZsbScore

      public ZsbScore(DataSet dataSet, boolean precomputeCovariances)
      Constructs the score using a covariance matrix.
      Parameters:
      dataSet - The data set.
  • Method Details

    • localScore

      public double localScore(int i, int... parents)
      Returns the score for the child given the parents.
      Specified by:
      localScore in interface Score
      Parameters:
      i - The index of the node.
      parents - The indices of the node's parents.
      Returns:
      The score
    • localScoreDiff

      public double localScoreDiff(int x, int y, int[] z)
      Returns localScore(y | z, x) - localScore(y | z).
      Specified by:
      localScoreDiff in interface Score
      Parameters:
      x - Node 1
      y - Node 2
      z - The conditioning nodes.
      Returns:
      The score.
    • getCovariances

      public ICovarianceMatrix getCovariances()
    • getSampleSize

      public int getSampleSize()
      Returns the sample size.
      Specified by:
      getSampleSize in interface Score
      Returns:
      This size.
    • isEffectEdge

      public boolean isEffectEdge(double bump)
      Returns a judgement for FGES for whether a certain bump in score gives efidence of an effect edges.
      Specified by:
      isEffectEdge in interface Score
      Parameters:
      bump - The bump.
      Returns:
      True, if so.
      See Also:
    • getVariables

      public List<Node> getVariables()
      Returns the variables.
      Specified by:
      getVariables in interface Score
      Returns:
      This list.
    • getMaxDegree

      public int getMaxDegree()
      Returns a judgment of max degree for some algorithms.
      Specified by:
      getMaxDegree in interface Score
      Returns:
      This maximum.
      See Also:
    • determines

      public boolean determines(List<Node> z, Node y)
      Returns true if the variable in Z determine y.
      Specified by:
      determines in interface Score
      Parameters:
      z - The set of nodes.
      y - The node.
      Returns:
      True, if so.
    • setRiskBound

      public void setRiskBound(double riskBound)
      Sets the risk bound for the Zhang Shen Bound score.
      Parameters:
      riskBound - The risk bound.