Package edu.cmu.tetrad.search
Class SemBicScore
java.lang.Object
edu.cmu.tetrad.search.SemBicScore
- All Implemented Interfaces:
Score
Implements the continuous BIC score for FGES.
- Author:
- Joseph Ramsey
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSemBicScore(DataSet dataSet) Constructs the score using a covariance matrix.SemBicScore(ICovarianceMatrix covariances) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Matrixbooleandetermines(List<Node> z, Node y) getData()intdoubleintdoublegetVariable(String targetName) static doublegetVarRy(int i, int[] parents, Matrix data, ICovarianceMatrix covariances, boolean calculateRowSubsets) booleanisEffectEdge(double bump) booleandoublelocalScore(int i) Specialized scoring method for no parents.doublelocalScore(int i, int parent) Specialized scoring method for a single parent.doublelocalScore(int i, int... parents) doublelocalScoreDiff(int x, int y) doublelocalScoreDiff(int x, int y, int[] z) doublenandyBic(int x, int y, int[] z) voidsetPenaltyDiscount(double penaltyDiscount) voidsetRuleType(SemBicScore.RuleType ruleType) voidsetStructurePrior(double structurePrior) voidsetVariables(List<Node> variables) voidsetVerbose(boolean verbose) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.Score
defaultScore, toString
-
Constructor Details
-
SemBicScore
Constructs the score using a covariance matrix. -
SemBicScore
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
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) - Specified by:
localScoreDiffin interfaceScore
-
nandyBic
public double nandyBic(int x, int y, int[] z) -
localScoreDiff
public double localScoreDiff(int x, int y) - Specified by:
localScoreDiffin interfaceScore
-
localScore
public double localScore(int i, int... parents) - Specified by:
localScorein interfaceScore- 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:
localScorein interfaceScore
-
localScore
public double localScore(int i) Specialized scoring method for no parents. Used to speed up the effect edges search.- Specified by:
localScorein interfaceScore
-
getPenaltyDiscount
public double getPenaltyDiscount() -
setPenaltyDiscount
public void setPenaltyDiscount(double penaltyDiscount) -
getStructurePrior
public double getStructurePrior() -
setStructurePrior
public void setStructurePrior(double structurePrior) -
getCovariances
-
getSampleSize
public int getSampleSize()- Specified by:
getSampleSizein interfaceScore
-
isEffectEdge
public boolean isEffectEdge(double bump) - Specified by:
isEffectEdgein interfaceScore
-
getDataModel
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
getVariables
- Specified by:
getVariablesin interfaceScore
-
setVariables
-
getVariable
- Specified by:
getVariablein interfaceScore
-
getMaxDegree
public int getMaxDegree()- Specified by:
getMaxDegreein interfaceScore
-
determines
- Specified by:
determinesin interfaceScore
-
getData
-
setRuleType
-
subset
-