Class ZsbScore
- All Implemented Interfaces:
Score
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.
- Version:
- $Id: $Id
- 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 TypeMethodDescriptionboolean
determines
(List<Node> z, Node y) Returns true iff the score determines the edge between x and y.Returns the covariance matrix.int
Returns the max degree, by default 1000.int
Returns the sample size.The variables of the score.boolean
isEffectEdge
(double bump) Returns true iff the edge between x and y is an effect edge.double
localScore
(int i, int... parents) Returns the score for the child given the parents.double
localScoreDiff
(int x, int y, int[] z) Returns the score difference of the graph.void
setRiskBound
(double riskBound) Sets the risk bound for the Zhang Shen Bound score.void
setUsePseudoInverse
(boolean usePseudoInverse) Sets whether to use the pseudo-inverse in place of the inverse in the score.Methods inherited from class java.lang.Object
equals, 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
-
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.precomputeCovariances
- a boolean
-
-
Method Details
-
localScore
public double localScore(int i, int... parents) Returns the score for the child given the parents.- Specified by:
localScore
in 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 the score difference of the graph.Returns localScore(y | z, x) - localScore(y | z).
- Specified by:
localScoreDiff
in interfaceScore
- Parameters:
x
- A node.y
- TAhe node.z
- A set of nodes.- Returns:
- The score difference.
-
getCovariances
Returns the covariance matrix.- Returns:
- The covariance matrix.
-
getSampleSize
public int getSampleSize()Returns the sample size.- Specified by:
getSampleSize
in interfaceScore
- Returns:
- This size.
-
isEffectEdge
public boolean isEffectEdge(double bump) Returns true iff the edge between x and y is an effect edge.Returns a judgement for FGES for whether a certain bump in score gives efidence of an effect edges.
- Specified by:
isEffectEdge
in interfaceScore
- Parameters:
bump
- The bump.- Returns:
- True iff the edge between x and y is an effect edge.
- See Also:
-
getVariables
The variables of the score.Returns the variables.
- Specified by:
getVariables
in interfaceScore
- Returns:
- This list.
-
getMaxDegree
public int getMaxDegree()Returns the max degree, by default 1000.Returns a judgment of max degree for some algorithms.
- Specified by:
getMaxDegree
in interfaceScore
- Returns:
- The max degree.
- See Also:
-
determines
Returns true iff the score determines the edge between x and y.Returns true if the variable in Z determine y.
- Specified by:
determines
in interfaceScore
- Parameters:
z
- The set of nodes.y
- The node.- Returns:
- True iff the score determines the edge between x and y.
-
setRiskBound
public void setRiskBound(double riskBound) Sets the risk bound for the Zhang Shen Bound score.- Parameters:
riskBound
- The risk bound.
-
setUsePseudoInverse
public void setUsePseudoInverse(boolean usePseudoInverse) Sets whether to use the pseudo-inverse in place of the inverse in the score.- Parameters:
usePseudoInverse
- True if the pseudo-inverse should be used.
-