Class GraphScore
- All Implemented Interfaces:
- Score
Chickering (2002) "Optimal structure identification with greedy search" Journal of Machine Learning Research.
For further discussion of using m-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.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionGraphScore(IndependenceFacts facts) Constructs a GraphScore from a list of independence facts.GraphScore(Graph dag) Constructs a GraphScore from a DAG.
- 
Method SummaryModifier and TypeMethodDescriptiongetDag()Returns a copy of the DAG being searched over.intReturns the max degree, by default 1000.intgetSampleSize.The variables of the score.booleanisEffectEdge(double bump) Returns true iff the edge between x and y is an effect edge.doublelocalScore(int i) Returns the local score of the gien node in the graph.doublelocalScore(int i, int parent) localScore.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) Returns the local score difference of the graph.doublelocalScoreDiff(int x, int y, int[] z) Returns the score difference of the graph.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.score.Scoreappend, determines, getVariable, toString
- 
Constructor Details- 
GraphScoreConstructs a GraphScore from a DAG.- Parameters:
- dag- A directed acyclic graph.
 
- 
GraphScoreConstructs a GraphScore from a list of independence facts.- Parameters:
- facts- A list known independence facts; a lookup will be donw from these facts.
- See Also:
 
 
- 
- 
Method Details- 
localScorepublic 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 interface- Score
- Parameters:
- y- a int
- z- an array of objects
- Returns:
- this score.
 
- 
localScoreDiffpublic double localScoreDiff(int x, int y, int[] z) Returns the score difference of the graph.Returns a "score difference", which amounts to a conditional local scoring criterion results. Only difference methods is implemented, since the other methods don't make sense here. - Specified by:
- localScoreDiffin interface- Score
- Parameters:
- x- A node.
- y- TAhe node.
- z- A set of nodes.
- Returns:
- The score difference.
 
- 
localScoreDiffpublic double localScoreDiff(int x, int y) Returns the local score difference of the graph.The "unconditional difference." Only difference methods is implemented, since the other methods don't make sense here. - Specified by:
- localScoreDiffin interface- Score
- Parameters:
- x- A node.
- y- The node.
- Returns:
- The local score difference.
 
- 
localScorepublic double localScore(int i, int parent) localScore. - Specified by:
- localScorein interface- Score
- Parameters:
- i- a int
- parent- a int
- Returns:
- a double
- Throws:
- UnsupportedOperationException- Since the method doesn't make sense here.
 
- 
localScorepublic double localScore(int i) Returns the local score of the gien node in the graph.- Specified by:
- localScorein interface- Score
- Parameters:
- i- A node.
- Returns:
- The local score.
 
- 
isEffectEdgepublic boolean isEffectEdge(double bump) Returns true iff the edge between x and y is an effect edge.Returns a judgment for FGES whether a score with the bump is for an effect edge. - Specified by:
- isEffectEdgein interface- Score
- Parameters:
- bump- The bump.
- Returns:
- True iff the edge between x and y is an effect edge.
- See Also:
 
- 
getVariablesThe variables of the score.Returns the list of variables. - Specified by:
- getVariablesin interface- Score
- Returns:
- This list.
 
- 
getMaxDegreepublic int getMaxDegree()Returns the max degree, by default 1000.Returns the maximum degree, which is set to 1000. - Specified by:
- getMaxDegreein interface- Score
- Returns:
- The max degree.
 
- 
getSampleSizepublic int getSampleSize()getSampleSize. - Specified by:
- getSampleSizein interface- Score
- Returns:
- a int
- Throws:
- UnsupportedOperationException- Since the method doesn't make sense here.
 
- 
getDagReturns a copy of the DAG being searched over.- Returns:
- This DAG.
 
 
-