Package edu.cmu.tetrad.search
Class GraphScore
java.lang.Object
edu.cmu.tetrad.search.GraphScore
- All Implemented Interfaces:
Score
Implements Chickering and Meek's (2002) locally consistent score criterion.
- Author:
- Joseph Ramsey
-
Constructor Summary
ConstructorsConstructorDescriptionGraphScore(IndependenceFacts facts) GraphScore(Graph dag) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptionbooleandetermines(List<Node> z, Node y) booleangetDag()getData()intintbooleanisDConnectedTo(Node x, Node y, List<Node> z) booleanisDSeparatedFrom(Node x, Node y, List<Node> z) 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 y, int[] z) Calculates the sample likelihood and BIC score for y given its z in a simple SEM modeldoublelocalScoreDiff(int x, int y) doublelocalScoreDiff(int x, int y, int[] z) voidvoidvoidsetVerbose(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
append, defaultScore, getVariable, toString
-
Constructor Details
-
GraphScore
Constructs the score using a covariance matrix. -
GraphScore
-
-
Method Details
-
localScore
public double localScore(int y, int[] z) Calculates the sample likelihood and BIC score for y given its z in a simple SEM model- Specified by:
localScorein interfaceScore- Parameters:
y- The index of the node.z- The indices of the node's parents.- Returns:
- The score, or NaN if the score cannot be calculated.
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) - Specified by:
localScoreDiffin interfaceScore
-
localScoreDiff
public double localScoreDiff(int x, int y) - Specified by:
localScoreDiffin interfaceScore
-
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
-
isEffectEdge
public boolean isEffectEdge(double bump) - Specified by:
isEffectEdgein interfaceScore
-
getDataSet
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
getVariables
- Specified by:
getVariablesin interfaceScore
-
getMaxDegree
public int getMaxDegree()- Specified by:
getMaxDegreein interfaceScore
-
determines
- Specified by:
determinesin interfaceScore
-
getData
-
getSampleSize
public int getSampleSize()- Specified by:
getSampleSizein interfaceScore
-
getAlternativePenalty
public boolean getAlternativePenalty() -
getDag
-
isDSeparatedFrom
-
isDConnectedTo
-
setPrefix
-
setN
-