Package edu.cmu.tetrad.search.score
Class IndTestScore
java.lang.Object
edu.cmu.tetrad.search.score.IndTestScore
- All Implemented Interfaces:
- Score
Gives a method of interpreting a test as a score. Various independence tests will calculate p-values; they simply
 report alpha - p as a score, which will be higher for greater dependence. This class wraps such an independence test
 and returns the score reported by that test.
 
As for all scores in Tetrad, higher scores mean more dependence, and negative scores indicate independence.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionIndTestScore(IndependenceTest test) Constructs the score using a covariance matrix.
- 
Method SummaryModifier and TypeMethodDescriptionbooleandetermines(List<Node> z, Node y) Returns true iff the score determines the edge between x and y.Returns the data set.intReturns the max degree, by default 1000.intReturns the sample size.The variables of the score.booleanisEffectEdge(double bump) Returns true iff the edge between x and y is an effect edge.booleanReturns true if verbose output should be sent to out.doublelocalScore(int i) Returns the local score of the gien node in the graph.doublelocalScore(int i, int parent) localScore.doublelocalScore(int i, int[] parents) Calculates the sample likelihood and BIC score for i, given its parents in a simple SEM modeldoublelocalScoreDiff(int x, int y, int[] z) Returns the score difference of the graph.voidsetVerbose(boolean verbose) Sets whether verbose output should be sent to out.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.score.Scoreappend, getVariable, localScoreDiff, toString
- 
Constructor Details- 
IndTestScoreConstructs the score using a covariance matrix.- Parameters:
- test- The independence test.
 
 
- 
- 
Method Details- 
localScorepublic double localScore(int i, int[] parents) Calculates the sample likelihood and BIC score for i, given its parents in a simple SEM model- Specified by:
- localScorein interface- Score
- Parameters:
- i- The index of the variable.
- parents- The indices of the parents of i.
- Returns:
- a double
 
- 
localScoreDiffReturns 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.
- Throws:
- InterruptedException- If the operation is interrupted.
 
- 
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- if called.
 
- 
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 true if the edge with the given bump is 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.
 
- 
getDataSetReturns the data set.- Returns:
- The data set.
 
- 
isVerbosepublic boolean isVerbose()Returns true if verbose output should be sent to out.- Returns:
- True if verbose output should be sent to out.
 
- 
setVerbosepublic void setVerbose(boolean verbose) Sets whether verbose output should be sent to out.- Parameters:
- verbose- True if verbose output should be sent to out.
 
- 
getVariablesThe variables of the score.Returns the list of variables. - Specified by:
- getVariablesin interface- Score
- Returns:
- This list.
 
- 
getSampleSizepublic int getSampleSize()Returns the sample size.- Specified by:
- getSampleSizein interface- Score
- Returns:
- The sample size.
 
- 
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.
 
- 
determinesReturns true iff the score determines the edge between x and y.Returns the 'determines' judgment from the first score. - Specified by:
- determinesin interface- Score
- Parameters:
- z- The set of nodes.
- y- The node.
- Returns:
- True iff the score determines the edge between x and y.
 
 
-