Class GicScores

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

public class GicScores extends Object implements Score

Implements scores motivated by the Generalized Information Criterion (GIC) approach as given in Kim et al. (2012).

Kim, Y., Kwon, S., & Choi, H. (2012). Consistent model selection criteria on high dimensions. The Journal of Machine Learning Research, 13(1), 1037-1057.

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

Author:
josephramsey
  • Constructor Details

    • GicScores

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

      public GicScores(DataSet dataSet, boolean precomputeCovariances)
      Constructs the score using a covariance matrix.
  • Method Details

    • localScoreDiff

      public double localScoreDiff(int x, int y, int[] z)
      Description copied from interface: Score
      Returns the score difference of the graph.
      Specified by:
      localScoreDiff in interface Score
      Parameters:
      x - A node.
      y - TAhe node.
      z - A set of nodes.
      Returns:
      The score difference.
    • localScore

      public double localScore(int i, int... parents)
      Description copied from interface: Score
      The score of a node given its parents.
      Specified by:
      localScore in interface Score
      Parameters:
      i - The node.
      parents - The parents.
      Returns:
      The score.
    • getCovariances

      public ICovarianceMatrix getCovariances()
      Specialized scoring method for a single parent. Used to speed up the effect edges search.
    • getSampleSize

      public int getSampleSize()
      Description copied from interface: Score
      The sample size of the data.
      Specified by:
      getSampleSize in interface Score
      Returns:
      This size.
    • isEffectEdge

      public boolean isEffectEdge(double bump)
      Description copied from interface: Score
      Returns true iff the edge between x and y is an effect edge.
      Specified by:
      isEffectEdge in interface Score
      Parameters:
      bump - The bump.
      Returns:
      True iff the edge between x and y is an effect edge.
    • getDataSet

      public DataSet getDataSet()
    • isVerbose

      public boolean isVerbose()
    • setVerbose

      public void setVerbose(boolean verbose)
    • getVariables

      public List<Node> getVariables()
      Description copied from interface: Score
      The variables of the score.
      Specified by:
      getVariables in interface Score
      Returns:
      This list.
    • setVariables

      public void setVariables(List<Node> variables)
    • getMaxDegree

      public int getMaxDegree()
      Description copied from interface: Score
      Returns the max degree, by default 1000.
      Specified by:
      getMaxDegree in interface Score
      Returns:
      The max degree.
    • determines

      public boolean determines(List<Node> z, Node y)
      Description copied from interface: Score
      Returns true iff the score determines the edge between x and y.
      Specified by:
      determines in interface Score
      Parameters:
      z - The set of nodes.
      y - The node.
      Returns:
      True iff the score determines the edge between x and y.
    • setRuleType

      public void setRuleType(GicScores.RuleType ruleType)
    • setLambda

      public void setLambda(double lambda)
    • getPenaltyDiscount

      public double getPenaltyDiscount()
    • setPenaltyDiscount

      public void setPenaltyDiscount(double penaltyDiscount)
    • toString

      public String toString()
      Description copied from interface: Score
      A string representation of the score.
      Specified by:
      toString in interface Score
      Overrides:
      toString in class Object
      Returns:
      This string.