Package edu.cmu.tetrad.search.score
Class ConditionalGaussianLikelihood
java.lang.Object
edu.cmu.tetrad.search.score.ConditionalGaussianLikelihood
Implements a conditional Gaussian likelihood. Please note that this likelihood will be maximal only if the continuous variables are jointly Gaussian conditional on the discrete variables; in all other cases, it will be less than maximal. The reference is here:
Andrews, B., Ramsey, J., & Cooper, G. F. (2018). Scoring Bayesian networks of mixed variables. International journal of data science and analytics, 6, 3-18.
As for all scores in Tetrad, higher scores mean more dependence, and negative scores indicate independence.
- Author:
- bryanandrews, josephramsey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Gives return value for a conditional Gaussain likelihood, returning a likelihood value and the degrees of freedom for it. -
Constructor Summary
ConstructorsConstructorDescriptionConditionalGaussianLikelihood
(DataSet dataSet) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptiongetLikelihood
(int i, int[] parents) Returns the likelihood of variable i conditional on the given parents, assuming the continuous mixedVariables index by i or by the parents are jointly Gaussian conditional on the discrete comparison.void
setDiscretize
(boolean discretize) Sets whether to discretize child variables to avoid integration.void
setNumCategoriesToDiscretize
(int numCategoriesToDiscretize) Sets the number of categories to use to discretize child variables to avoid integrationlvoid
setPenaltyDiscount
(double penaltyDiscount) Sets the penalty discount for this score, which is a multiplier on the panalty term of BIC.void
-
Constructor Details
-
ConditionalGaussianLikelihood
Constructs the score using a covariance matrix.
-
-
Method Details
-
setRows
-
getLikelihood
Returns the likelihood of variable i conditional on the given parents, assuming the continuous mixedVariables index by i or by the parents are jointly Gaussian conditional on the discrete comparison.- Parameters:
i
- The index of the conditioned variable.parents
- The indices of the conditioning mixedVariables.- Returns:
- The likelihood.
-
setPenaltyDiscount
public void setPenaltyDiscount(double penaltyDiscount) Sets the penalty discount for this score, which is a multiplier on the panalty term of BIC.- Parameters:
penaltyDiscount
- The penalty discount.
-
setDiscretize
public void setDiscretize(boolean discretize) Sets whether to discretize child variables to avoid integration. An optimization.- Parameters:
discretize
- True, if so.- See Also:
-
setNumCategoriesToDiscretize
public void setNumCategoriesToDiscretize(int numCategoriesToDiscretize) Sets the number of categories to use to discretize child variables to avoid integrationl- Parameters:
numCategoriesToDiscretize
- This number.- See Also:
-