Class ImagesScore
- All Implemented Interfaces:
Score
Importantly, only the variables from the first score will be returned from the getVariables method, so it is up to the user to ensure that all the scores share the same (object-identical) variables.
As for all scores in Tetrad, higher scores mean more dependence, and negative scores indicate independence.
-
Constructor Summary
ConstructorsConstructorDescriptionImagesScore(List<Score> scores) Constructs an IMaGES score using the given list of individual scores. -
Method Summary
Modifier and TypeMethodDescriptionbooleandetermines(List<Node> z, Node y) Returns true iff the score determines the edge between x and y.intReturns the max degree, by default 1000.intThe sample size of the data.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) Returns the (aggregate) local score for a variable given one of its parents, which is obtained by averaging the local such scores obtained from each individual score provided in the constructor, excluding scores that are returned as undefined (which are left out of the average).doublelocalScore(int i, int[] parents) Returns the (aggregate) local score for a variable given its parents, which is obtained by averaging the local such scores obtained from each individual score provided in the constructor, excluding scores that are returned as undefined (which are left out of the average).doublelocalScore(int i, int[] parents, int index) Returns the (aggregate) local score for a variable given its parents, which is obtained by averaging the local such scores obtained from each individual score provided in the constructor, excluding scores that are returned as undefined (which are left out of the average).doublelocalScoreDiff(int x, int y, int[] z) Returns the score difference of the graph.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.score.Score
append, getVariable, localScoreDiff, toString
-
Constructor Details
-
ImagesScore
Constructs an IMaGES score using the given list of individual scores. These scores will be averaged to obtain the IMaGES score itself.- Parameters:
scores- The list of scores.
-
-
Method Details
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) Returns the score difference of the graph.Returns the average of the individual scores returned from each component score from their localScoreDiff methods. Score differences that are returned as undefined (NaN) are excluded from the average.
- Specified by:
localScoreDiffin interfaceScore- Parameters:
x- A node.y- TAhe node.z- A set of nodes.- Returns:
- The score difference.
-
localScore
public double localScore(int i, int[] parents) Returns the (aggregate) local score for a variable given its parents, which is obtained by averaging the local such scores obtained from each individual score provided in the constructor, excluding scores that are returned as undefined (which are left out of the average).- Specified by:
localScorein interfaceScore- Parameters:
i- The variable whose score is needed.parents- an array ofintobjects- Returns:
- This score.
-
localScore
public double localScore(int i, int[] parents, int index) Returns the (aggregate) local score for a variable given its parents, which is obtained by averaging the local such scores obtained from each individual score provided in the constructor, excluding scores that are returned as undefined (which are left out of the average).- Parameters:
i- The variable whose score is needed.parents- The indices of the parents.index- The index of the score to use.- Returns:
- This score.
-
localScore
public double localScore(int i, int parent) Returns the (aggregate) local score for a variable given one of its parents, which is obtained by averaging the local such scores obtained from each individual score provided in the constructor, excluding scores that are returned as undefined (which are left out of the average).- Specified by:
localScorein interfaceScore- Parameters:
i- The variable whose score is needed.parent- a int- Returns:
- This score.
-
localScore
public double localScore(int i) Returns the local score of the gien node in the graph.Returns the (aggregate) local node score, which is obtained by averaging the local scores obtained from each individual score provided in the constructor, excluding scores that are returned as undefined (which are left out of the average).
- Specified by:
localScorein interfaceScore- Parameters:
i- A node.- Returns:
- The local score.
-
isEffectEdge
public 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 interfaceScore- Parameters:
bump- The bump.- Returns:
- True iff the edge between x and y is an effect edge.
-
getVariables
The variables of the score.Returns the variables.
- Specified by:
getVariablesin interfaceScore- Returns:
- This list.
-
getSampleSize
public int getSampleSize()The sample size of the data.Returns the sample size from the first score.
- Specified by:
getSampleSizein interfaceScore- Returns:
- This size.
-
getMaxDegree
public int getMaxDegree()Returns the max degree, by default 1000.Returns the max degree from teh first score.
- Specified by:
getMaxDegreein interfaceScore- Returns:
- The max degree.
-
determines
Returns true iff the score determines the edge between x and y.Returns the 'determines' judgment from the first score.
- Specified by:
determinesin interfaceScore- Parameters:
z- The set of nodes.y- The node.- Returns:
- True iff the score determines the edge between x and y.
-