Class SemBicScore

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

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

    • SemBicScore

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

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

    • getVarRy

      public static double getVarRy(int i, int[] parents, Matrix data, ICovarianceMatrix covariances, boolean calculateRowSubsets) throws org.apache.commons.math3.linear.SingularMatrixException
      Throws:
      org.apache.commons.math3.linear.SingularMatrixException
    • bStar

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

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

      public double nandyBic(int x, int y, int[] z)
    • localScoreDiff

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

      public double localScore(int i, int... 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, or NaN if the score cannot be calculated.
    • 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
    • getPenaltyDiscount

      public double getPenaltyDiscount()
    • setPenaltyDiscount

      public void setPenaltyDiscount(double penaltyDiscount)
    • getStructurePrior

      public double getStructurePrior()
    • setStructurePrior

      public void setStructurePrior(double structurePrior)
    • 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
    • getDataModel

      public DataModel getDataModel()
    • isVerbose

      public boolean isVerbose()
    • setVerbose

      public void setVerbose(boolean verbose)
    • getVariables

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

      public void setVariables(List<Node> variables)
    • 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
    • getData

      public DataModel getData()
    • setRuleType

      public void setRuleType(SemBicScore.RuleType ruleType)
    • subset

      public SemBicScore subset(List<Node> pi2)