Package edu.cmu.tetrad.search
Class ConditionalGaussianScore
java.lang.Object
edu.cmu.tetrad.search.ConditionalGaussianScore
- All Implemented Interfaces:
Score
Implements a conditional Gaussian BIC score for FGS.
- Author:
- Joseph Ramsey
-
Constructor Summary
ConstructorsConstructorDescriptionConditionalGaussianScore
(DataSet dataSet, double penaltyDiscount, double structurePrior, boolean discretize) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptionboolean
determines
(List<Node> z, Node y) int
double
int
getVariable
(String targetName) boolean
isEffectEdge
(double bump) double
localScore
(int i) Specialized scoring method for no parents.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) double
localScoreDiff
(int x, int y, int[] z) void
setNumCategoriesToDiscretize
(int numCategoriesToDiscretize) void
setPenaltyDiscount
(double penaltyDiscount) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.cmu.tetrad.search.Score
defaultScore
-
Constructor Details
-
ConditionalGaussianScore
public ConditionalGaussianScore(DataSet dataSet, double penaltyDiscount, double structurePrior, boolean discretize) 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 index of the node.parents
- The indices of the node's parents.- Returns:
- The score, or NaN if the score cannot be calculated.
-
localScoreDiff
public double localScoreDiff(int x, int y, int[] z) - Specified by:
localScoreDiff
in interfaceScore
-
localScoreDiff
public double localScoreDiff(int x, int y) - 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) Specialized scoring method for no parents. Used to speed up the effect edges search.- Specified by:
localScore
in interfaceScore
-
getSampleSize
public int getSampleSize()- Specified by:
getSampleSize
in interfaceScore
-
isEffectEdge
public boolean isEffectEdge(double bump) - Specified by:
isEffectEdge
in interfaceScore
-
getVariables
- Specified by:
getVariables
in interfaceScore
-
getVariable
- Specified by:
getVariable
in interfaceScore
-
getMaxDegree
public int getMaxDegree()- Specified by:
getMaxDegree
in interfaceScore
-
determines
- Specified by:
determines
in interfaceScore
-
getPenaltyDiscount
public double getPenaltyDiscount() -
setPenaltyDiscount
public void setPenaltyDiscount(double penaltyDiscount) -
setNumCategoriesToDiscretize
public void setNumCategoriesToDiscretize(int numCategoriesToDiscretize) -
toString
-