Class GraphScore
- All Implemented Interfaces:
Score
Implements a pscudo-"score" that implmenets implements Chickering and Meek's (2002) locally consistent score criterion. This is not a true score; rather, a -1 is returned in case dseparation holds and a 1 in case dseparation does not hold. This is only meant to be used in the context of FGES, and allows the search to follow its path prescribed by the locally consistent scoring criterion. For a reference to the latter, pleasee this article:
Chickering (2002) "Optimal structure identification with greedy search" Journal of Machine Learning Research.
For further discussion of using d-separation in the GES search, see:
Nandy, P., Hauser, A., & Maathuis, M. H. (2018). High-dimensional consistency in score-based and hybrid structure learning. The Annals of Statistics, 46(6A), 3151-3183.
For more discussion please see:
Shen, X., Zhu, S., Zhang, J., Hu, S., & Chen, Z. (2022, August). Reframed GES with a neural conditional dependence measure. In Uncertainty in Artificial Intelligence (pp. 1782-1791). PMLR.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGraphScore(IndependenceFacts facts) Constructor.GraphScore(Graph dag) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleandetermines(List<Node> z, Node y) getDag()Returns a copy of the DAG being searched over.getData()intReturns the maximum degree, which is set to 1000.intThe sample size of the data.Returns the list of variables.booleanisEffectEdge(double bump) Returns a judgment for FGES as to whether a score with the bump is for an effect edge.doublelocalScore(int i) doublelocalScore(int i, int parent) doublelocalScore(int y, int[] z) Calculates the sample likelihood and BIC score for y given its z in a simple SEM model.doublelocalScoreDiff(int x, int y) The "unconditional difference."doublelocalScoreDiff(int x, int y, int[] z) Returns a "score difference", which amounts to a conditional local scoring criterion resultsMethods 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.Score
append, getVariable, toString
-
Constructor Details
-
GraphScore
Constructor- Parameters:
dag- A directed acyclic graph.
-
GraphScore
Constructor.- Parameters:
facts- A list known independence facts; a lookup will be donw from these facts.- See Also:
-
-
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 node.z- The parents.- Returns:
- this score.
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) Returns a "score difference", which amounts to a conditional local scoring criterion results- Specified by:
localScoreDiffin interfaceScore- Returns:
- The "difference".
-
localScoreDiff
public double localScoreDiff(int x, int y) The "unconditional difference."- Specified by:
localScoreDiffin interfaceScore- Returns:
- This.
-
localScore
public double localScore(int i, int parent) - Specified by:
localScorein interfaceScore- Throws:
javax.help.UnsupportedOperationException- Since the method doesn't make sense here.
-
localScore
public double localScore(int i) - Specified by:
localScorein interfaceScore- Throws:
javax.help.UnsupportedOperationException- Since the method doesn't make sense here.
-
isEffectEdge
public boolean isEffectEdge(double bump) Returns a judgment for FGES as to whether a score with the bump is for an effect edge.- Specified by:
isEffectEdgein interfaceScore- Parameters:
bump- The bump- Returns:
- True if so.
- See Also:
-
getDataSet
- Throws:
javax.help.UnsupportedOperationException- Since the method doesn't make sense here.
-
getVariables
Returns the list of variables.- Specified by:
getVariablesin interfaceScore- Returns:
- This list.
-
getMaxDegree
public int getMaxDegree()Returns the maximum degree, which is set to 1000.- Specified by:
getMaxDegreein interfaceScore- Returns:
- 1000.
-
determines
- Specified by:
determinesin interfaceScore- Throws:
javax.help.UnsupportedOperationException- Since this method doesn't make sense here.
-
getData
- Throws:
javax.help.UnsupportedOperationException- Since this "score" does not use data.
-
getSampleSize
public int getSampleSize()Description copied from interface:ScoreThe sample size of the data.- Specified by:
getSampleSizein interfaceScore- Returns:
- This size.
- Throws:
javax.help.UnsupportedOperationException- Since this score does not use data.
-
getDag
Returns a copy of the DAG being searched over.- Returns:
- This DAG.
-