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.
- Version:
- $Id: $Id
- Author:
- bryanandrews, josephramsey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Gives return value for a conditional Gaussian 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
setMinSampleSizePerCell
(int minSampleSizePerCell) Sets the minimum sample size per cell.void
setNumCategoriesToDiscretize
(int numCategoriesToDiscretize) Sets the number of categories to use to discretize child variables to avoid integrationvoid
Sets the rows to be used in the table.
-
Constructor Details
-
ConditionalGaussianLikelihood
Constructs the score using a covariance matrix.- Parameters:
dataSet
- The continuous dataset to analyze.
-
-
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.
-
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 integration- Parameters:
numCategoriesToDiscretize
- This number.- See Also:
-
setMinSampleSizePerCell
public void setMinSampleSizePerCell(int minSampleSizePerCell) Sets the minimum sample size per cell.- Parameters:
minSampleSizePerCell
- The minimum sample size per cell.
-