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, boolean discretize) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptionbooleandetermines(List<Node> z, Node y) intdoubleintSpecialized scoring method for a single parent.booleanisEffectEdge(double bump) doublelocalScore(int i, int... parents) Calculates the sample likelihood and BIC score for i given its parents in a simple SEM modeldoublelocalScoreDiff(int x, int y, int[] z) voidsetNumCategoriesToDiscretize(int numCategoriesToDiscretize) voidsetPenaltyDiscount(double penaltyDiscount) voidsetStructurePrior(double structurePrior) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.Score
append, defaultScore, getVariable, localScore, localScore, localScoreDiff
-
Constructor Details
-
ConditionalGaussianScore
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:
localScorein 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:
localScoreDiffin interfaceScore
-
getSampleSize
public int getSampleSize()Specialized scoring method for a single parent. Used to speed up the effect edges search.- Specified by:
getSampleSizein interfaceScore
-
isEffectEdge
public boolean isEffectEdge(double bump) - Specified by:
isEffectEdgein interfaceScore
-
getVariables
- Specified by:
getVariablesin interfaceScore
-
getMaxDegree
public int getMaxDegree()- Specified by:
getMaxDegreein interfaceScore
-
determines
- Specified by:
determinesin interfaceScore
-
getPenaltyDiscount
public double getPenaltyDiscount() -
setPenaltyDiscount
public void setPenaltyDiscount(double penaltyDiscount) -
setNumCategoriesToDiscretize
public void setNumCategoriesToDiscretize(int numCategoriesToDiscretize) -
toString
-
setStructurePrior
public void setStructurePrior(double structurePrior)
-