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:
-
IndependenceTest
IndependenceTest#getScore()
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestScore
(IndependenceTest test) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptionboolean
determines
(List<Node> z, Node y) int
int
The sample size of the data.The variables of the score.boolean
isEffectEdge
(double bump) boolean
double
localScore
(int i) double
localScore
(int i, int parent) Specialized scoring method for a single parent.double
localScore
(int i, int[] parents) Calculates the sample likelihood and BIC score for i, given its parents in a simple SEM modeldouble
localScoreDiff
(int x, int y, int[] z) void
setVerbose
(boolean verbose) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
localScore
in interfaceScore
- Parameters:
i
- The node.parents
- The parents.- Returns:
- The score.
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) - Specified by:
localScoreDiff
in interfaceScore
-
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:
localScore
in interfaceScore
-
localScore
public double localScore(int i) - Specified by:
localScore
in interfaceScore
-
isEffectEdge
public boolean isEffectEdge(double bump) - Specified by:
isEffectEdge
in interfaceScore
-
getDataSet
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
getVariables
Description copied from interface:Score
The variables of the score.- Specified by:
getVariables
in interfaceScore
- Returns:
- This list.
-
getSampleSize
public int getSampleSize()Description copied from interface:Score
The sample size of the data.- Specified by:
getSampleSize
in interfaceScore
- Returns:
- This size.
-
getMaxDegree
public int getMaxDegree()- Specified by:
getMaxDegree
in interfaceScore
-
determines
- Specified by:
determines
in interfaceScore
-