Package edu.cmu.tetrad.search
Class ZhangShenBoundScore
java.lang.Object
edu.cmu.tetrad.search.ZhangShenBoundScore
- All Implemented Interfaces:
Score
Implements the Zhang-Shen bound score.
- Author:
- Joseph Ramsey
-
Constructor Summary
ConstructorsConstructorDescriptionZhangShenBoundScore
(DataSet dataSet) Constructs the score using a covariance matrix.ZhangShenBoundScore
(ICovarianceMatrix covariances) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptionboolean
determines
(List<Node> z, Node y) Specialized scoring method for a single parent.int
static double
getP
(double pn, double m0, double lambda) int
boolean
boolean
isEffectEdge
(double bump) boolean
double
localScore
(int i, int... parents) double
localScoreDiff
(int x, int y, int[] z) void
setChanged
(boolean b) void
setRiskBound
(double riskBound) void
setVerbose
(boolean verbose) static double
zhangShenLambda
(int m0, double pn, double riskBound) 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
append, defaultScore, getVariable, localScore, localScore, localScoreDiff, toString
-
Constructor Details
-
ZhangShenBoundScore
Constructs the score using a covariance matrix. -
ZhangShenBoundScore
Constructs the score using a covariance matrix.
-
-
Method Details
-
zhangShenLambda
public static double zhangShenLambda(int m0, double pn, double riskBound) -
getP
public static double getP(double pn, double m0, double lambda) -
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) - Specified by:
localScoreDiff
in interfaceScore
-
localScore
- 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
-
getCovariances
Specialized scoring method for a single parent. Used to speed up the effect edges search. -
getSampleSize
public int getSampleSize()- Specified by:
getSampleSize
in interfaceScore
-
isEffectEdge
public boolean isEffectEdge(double bump) - Specified by:
isEffectEdge
in interfaceScore
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
getVariables
- Specified by:
getVariables
in interfaceScore
-
getMaxDegree
public int getMaxDegree()- Specified by:
getMaxDegree
in interfaceScore
-
determines
- Specified by:
determines
in interfaceScore
-
isChanged
public boolean isChanged() -
setChanged
public void setChanged(boolean b) -
setRiskBound
public void setRiskBound(double riskBound)
-