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.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestScore(IndependenceTest test) Constructs the score using a covariance matrix. -
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.booleandoublelocalScore(int i) Returns the local score of the gien node in the graph.doublelocalScore(int i, int parent) Specialized scoring method for a single parent.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) Methods 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, localScoreDiff, toString
-
Constructor Details
-
IndTestScore
Constructs the score using a covariance matrix.
-
-
Method Details
-
localScore
public 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 interfaceScore- Parameters:
i- The node.parents- The parents.- Returns:
- The score.
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) Description copied from interface:ScoreReturns the score difference of the graph.- 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 parent) Specialized scoring method for a single parent. Used to speed up the effect edges search.- Specified by:
localScorein interfaceScore- Parameters:
i- A node.parent- A parent.- Returns:
- The local score.
-
localScore
public double localScore(int i) Description copied from interface:ScoreReturns the local score of the gien node in the graph.- Specified by:
localScorein interfaceScore- Parameters:
i- A node.- Returns:
- The local score.
-
isEffectEdge
public boolean isEffectEdge(double bump) Description copied from interface:ScoreReturns true iff the edge between x and y is an effect edge.- Specified by:
isEffectEdgein interfaceScore- Parameters:
bump- The bump.- Returns:
- True iff the edge between x and y is an effect edge.
-
getDataSet
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
getVariables
Description copied from interface:ScoreThe variables of the score.- Specified by:
getVariablesin interfaceScore- Returns:
- This list.
-
getSampleSize
public int getSampleSize()Description copied from interface:ScoreThe sample size of the data.- Specified by:
getSampleSizein interfaceScore- Returns:
- This size.
-
getMaxDegree
public int getMaxDegree()Description copied from interface:ScoreReturns the max degree, by default 1000.- Specified by:
getMaxDegreein interfaceScore- Returns:
- The max degree.
-
determines
Description copied from interface:ScoreReturns true iff the score determines the edge between x and y.- 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.
-