Class ImagesScore
- All Implemented Interfaces:
- Score
Implements a score to average results over multiple scores. This is used for the IMaGES algorithm. The idea is that one pick and algorithm that takes (only) a score as input, such as FGES or GRaSP or BOSS, and then constructs an ImagesScore (which class) with a list of datasets as input, using same object-identical variables, and feeds this Images score to this algorithm through the contructor. One then runs the algorithm to get an estimate of the structure.
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 of 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 SummaryConstructorsConstructorDescriptionImagesScore(List<Score> scores) Constructs an IMaGES score using the given list of individual scores.
- 
Method SummaryModifier and TypeMethodDescriptionbooleandetermines(List<Node> z, Node y) Returns the 'determines' judgment from the first score.intReturns the max degree from teh first score.intReturns the sample size from the first score.Returns the variables.booleanisEffectEdge(double bump) doublelocalScore(int i) 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).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) doublelocalScoreDiff(int x, int y, int[] z) Returns the average of the individual scores returned from each component score from their localScoreDiff methods.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.score.Scoreappend, getVariable, localScoreDiff, toString
- 
Constructor Details- 
ImagesScoreConstructs 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- 
localScoreDiffpublic double localScoreDiff(int x, int y, int[] z) 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 interface- Score
- Returns:
- This average score.
 
- 
localScorepublic 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 interface- Score
- Parameters:
- i- The variable whose score is needed.
- parents- The parents.
- Returns:
- This score.
 
- 
localScorepublic double localScore(int i, int[] parents, int index) 
- 
localScorepublic 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 interface- Score
- Parameters:
- i- The variable whose score is needed.
- Returns:
- This score.
 
- 
localScorepublic double localScore(int i) 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 interface- Score
- Parameters:
- i- The variable whose score is needed.
- Returns:
- This score.
 
- 
isEffectEdgepublic boolean isEffectEdge(double bump) - Specified by:
- isEffectEdgein interface- Score
 
- 
getVariablesReturns the variables.- Specified by:
- getVariablesin interface- Score
- Returns:
- This list.
 
- 
getSampleSizepublic int getSampleSize()Returns the sample size from the first score.- Specified by:
- getSampleSizein interface- Score
- Returns:
- This size.
 
- 
getMaxDegreepublic int getMaxDegree()Returns the max degree from teh first score.- Specified by:
- getMaxDegreein interface- Score
- Returns:
- This maximum.
 
- 
determinesReturns the 'determines' judgment from the first score.- Specified by:
- determinesin interface- Score
- Returns:
- This judgment, true if the 'determine' relations holds.
 
 
-