Class MvpLikelihood

java.lang.Object
edu.cmu.tetrad.search.score.MvpLikelihood

public class MvpLikelihood extends Object
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

    Constructors
    Constructor
    Description
    MvpLikelihood(DataSet dataSet, double structurePrior, int fDegree, boolean discretize)
    Constructs the score using a data set.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    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
    Returns the structure prior.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MvpLikelihood

      public MvpLikelihood(DataSet dataSet, double structurePrior, int fDegree, boolean discretize)
      Constructs the score using a data set.
      Parameters:
      dataSet - A dataset with a mixture of continuous and discrete variables. It may be all continuous or
      structurePrior - The structure prior.
      fDegree - F-degree
      discretize - 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