Class ZsbScore
- All Implemented Interfaces:
Score
Implements an unpublished score based on a risk bound due to Zhang and Shen. It adapts Theorem 1 in the following reference:
Zhang, Y., & Shen, X. (2010). Model selection procedure for high‐dimensional data. Statistical Analysis and Data Mining: The ASA Data Science Journal, 3(5), 350-358
The score uses Theorem 1 in the above to numerically search for a lambda value that is bounded by a given probability risk, between 0 and 1, if outputting a local false positive parent for a variable. There is a parameter m0, which is a maximum number of parents for a particular variable, which is free. The solution of this score is to increase m0 from 0 upward, re-evaluating with each scoring that is done using that variable as a target node. Thus, over time, a lower bound on m0 is estimated with more and more precision. So as the score is used in the context of FGES or GRaSP, for instance, so long as the score for a given node is visited more than once, the scores output by the procedure can be expected to improve, though setting m0 to 0 for all variables does not give bad results even by itself.
This score is conservative for large, dense models and faster than other available scores in this package. The risk bound is easily interpreted.
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.ZsbScore(ICovarianceMatrix covMatrix) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptionbooleandetermines(List<Node> z, Node y) Returns true if the variable in Z determine y.intReturns a judgment of max degree for some algorithms.intReturns the sample size.Returns the variables.booleanisEffectEdge(double bump) Returns a judgement for FGES for whether a certain bump in score gives efidence of an effect edges.doublelocalScore(int i, int... parents) Returns the score for the child given the parents.doublelocalScoreDiff(int x, int y, int[] z) Returns localScore(y | z, x) - localScore(y | z).voidsetRiskBound(double riskBound) Sets the risk bound for the Zhang Shen Bound score.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, localScore, localScore, localScoreDiff, toString
-
Constructor Details
-
ZsbScore
Constructs the score using a covariance matrix.- Parameters:
covMatrix- The covariance matrix.
-
ZsbScore
Constructs the score using a covariance matrix.- Parameters:
dataSet- The data set.
-
-
Method Details
-
localScore
public double localScore(int i, int... parents) Returns the score for the child given the parents.- Specified by:
localScorein interfaceScore- Parameters:
i- The index of the node.parents- The indices of the node's parents.- Returns:
- The score
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) Returns localScore(y | z, x) - localScore(y | z).- Specified by:
localScoreDiffin interfaceScore- Parameters:
x- Node 1y- Node 2z- The conditioning nodes.- Returns:
- The score.
-
getCovariances
-
getSampleSize
public int getSampleSize()Returns the sample size.- Specified by:
getSampleSizein interfaceScore- Returns:
- This size.
-
isEffectEdge
public boolean isEffectEdge(double bump) Returns a judgement for FGES for whether a certain bump in score gives efidence of an effect edges.- Specified by:
isEffectEdgein interfaceScore- Parameters:
bump- The bump.- Returns:
- True, if so.
- See Also:
-
getVariables
Returns the variables.- Specified by:
getVariablesin interfaceScore- Returns:
- This list.
-
getMaxDegree
public int getMaxDegree()Returns a judgment of max degree for some algorithms.- Specified by:
getMaxDegreein interfaceScore- Returns:
- This maximum.
- See Also:
-
determines
Returns true if the variable in Z determine y.- Specified by:
determinesin interfaceScore- Parameters:
z- The set of nodes.y- The node.- Returns:
- True, if so.
-
setRiskBound
public void setRiskBound(double riskBound) Sets the risk bound for the Zhang Shen Bound score.- Parameters:
riskBound- The risk bound.
-