Class BayesProperties

java.lang.Object
edu.cmu.tetrad.bayes.BayesProperties

public final class BayesProperties extends Object
Calculates some scores for Bayes nets as a whole.
Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

    • BayesProperties

      public BayesProperties(DataSet dataSet)
      Constructs a new BayesProperties object for the given data set.
      Parameters:
      dataSet - The data set.
  • Method Details

    • getLikelihoodRatioP

      public BayesProperties.LikelihoodRet getLikelihoodRatioP(Graph graph0)
      Calculates the p-value of the graph with respect to the given data, against the complete model as an alternative.
      Parameters:
      graph0 - The model to test.
      Returns:
      The p-value.
    • getChisq

      public double getChisq()
      Call after calling getLikelihoodP().
      Returns:
      The chi-squared statistic.
    • getDof

      public double getDof()
      Call after calling getLikelihoodP().
      Returns:
      The degrees of freedom.
    • getBic

      public double getBic()
      Call after calling getLikelihoodP().
      Returns:
      The BIC.
    • getLikelihood

      public double getLikelihood()
      Call after calling getLikelihoodP().
      Returns:
      The likelihood.
    • getSampleSize

      public int getSampleSize()
      Returns the sample size.
      Returns:
      The sample size.
    • getVariable

      public Node getVariable(String targetName)
      Returns the variable with the given name (assumed the target).
      Parameters:
      targetName - The name of the target variable.
      Returns:
      a Node object