Package edu.cmu.tetrad.search.score
Class EbicScore
java.lang.Object
edu.cmu.tetrad.search.score.EbicScore
- All Implemented Interfaces:
Score
Implements the extended BIC (EBIC) score. The reference is here:
Chen, J., & Chen, Z. (2008). Extended Bayesian information criteria for model selection with large model spaces. Biometrika, 95(3), 759-771.
As for all scores in Tetrad, higher scores mean more dependence, and negative scores indicate independence.
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs the score using a covariance matrix.EbicScore
(ICovarianceMatrix covariances) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptionboolean
determines
(List<Node> z, Node y) Return a judgment of whether the variable in z determine y exactly.int
Returns an estimate of max degree of the graph for some algorithms.int
Returns the sample size.Returns the variables for this score.boolean
isEffectEdge
(double bump) Returns a judgement for FGES of whether the given bump implies an effect edge.double
localScore
(int i, int... parents) Returns the score of the node i given its parents.double
localScoreDiff
(int x, int y, int[] z) Returns the score difference of the graph.void
setGamma
(double gamma) Sets the gamma parameter for EBIC.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, localScore, localScore, localScoreDiff, toString
-
Constructor Details
-
EbicScore
Constructs the score using a covariance matrix. -
EbicScore
Constructs the score using a covariance matrix.- Parameters:
dataSet
- The continuous dataset to analyze.precomputeCovariances
- Whether the covariances should be precomputed or computed on the fly. True if precomputed.
-
-
Method Details
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) Description copied from interface:Score
Returns the score difference of the graph.- Specified by:
localScoreDiff
in interfaceScore
- Parameters:
x
- A node.y
- TAhe node.z
- A set of nodes.- Returns:
- localScore(y | z, x) - localScore(y | z).
-
localScore
Returns the score of the node i given its parents.- Specified by:
localScore
in interfaceScore
- Parameters:
i
- The index of the node.parents
- The indices of the node's parents.- Returns:
- The score, or NaN if the score cannot be calculated.
- Throws:
RuntimeException
-
getSampleSize
public int getSampleSize()Returns the sample size.- Specified by:
getSampleSize
in interfaceScore
- Returns:
- This size.
-
isEffectEdge
public boolean isEffectEdge(double bump) Returns a judgement for FGES of whether the given bump implies an effect edge.- Specified by:
isEffectEdge
in interfaceScore
- Parameters:
bump
- The bump- Returns:
- True if so
- See Also:
-
getVariables
Returns the variables for this score.- Specified by:
getVariables
in interfaceScore
- Returns:
- Thsi list.
-
getMaxDegree
public int getMaxDegree()Returns an estimate of max degree of the graph for some algorithms.- Specified by:
getMaxDegree
in interfaceScore
- Returns:
- This max degree.
- See Also:
-
determines
Return a judgment of whether the variable in z determine y exactly.- Specified by:
determines
in interfaceScore
- Parameters:
z
- The set of nodes.y
- The node.- Returns:
- This judgment
-
setGamma
public void setGamma(double gamma) Sets the gamma parameter for EBIC.- Parameters:
gamma
- The gamma parameter.
-