Package edu.cmu.tetrad.search.score
Class MvpLikelihood
java.lang.Object
edu.cmu.tetrad.search.score.MvpLikelihood
Calculates Mixed Variables Polynomial likelihood. 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.
- Version:
- $Id: $Id
- Author:
- Bryan Andrews
-
Constructor Summary
ConstructorsConstructorDescriptionMvpLikelihood
(DataSet dataSet, double structurePrior, int fDegree, boolean discretize) Constructs the score using a data set. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getDoF
(int child_index, int[] parents) Returns the score of the node at index i, given its parents.double
getEBICprior.double
getLik
(int child_index, int[] parents) Returns the score of the node at index i, given its parents.double
getStructurePrior
(int k) Returns the structure prior.
-
Constructor Details
-
MvpLikelihood
Constructs the score using a data set.- Parameters:
dataSet
- A dataset with a mixture of continuous and discrete variables. It may be all continuous orstructurePrior
- The structure prior.fDegree
- F-degreediscretize
- When a discrete variable is a child of a continuous variable, one (expensive) way to solve the problem is to do a numerical integration. A less expensive (and often more accurate) way to solve the problem is to discretize the child with a certain number of discrete categories. if this parameter is set to True, a separate copy of all variables is maintained that is discretized in this way, and these are substituted for the discrete children when this sort of problem needs to be solved. This information needs to be known in the constructor since one needs to know right away whether ot create this separate discretized version of the continuous columns.
-
-
Method Details
-
getLik
public double getLik(int child_index, int[] parents) Returns the score of the node at index i, given its parents.- Parameters:
child_index
- The index of the child.parents
- The indices of the parents.- Returns:
- The score.
-
getDoF
public double getDoF(int child_index, int[] parents) Returns the score of the node at index i, given its parents.- Parameters:
child_index
- The index of the child.parents
- The indices of the parents.- Returns:
- The score.
-
getStructurePrior
public double getStructurePrior(int k) Returns the structure prior.- Parameters:
k
- The number of edges.- Returns:
- The structure prior.
-
getEBICprior
public double getEBICprior()getEBICprior.
- Returns:
- a double
-