Class IntAveDataSetProbs

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

public final class IntAveDataSetProbs extends Object
Estimates probabilities directly from data on the fly using maximum likelihood method, with the exception that if rows do not exist in the data satisfying a required condition because certain values are unattested, an attempt is made to remove each relevant column in turn, record the estimated probability with column removed from the condition (if it is defined), and then return the average over the estimated probabilities calculated this way.
Author:
josephramsey
  • Constructor Details

    • IntAveDataSetProbs

      public IntAveDataSetProbs(DataSet dataSet)
      Creates a cell count table for the given data set.
  • Method Details

    • getCellProb

      public double getCellProb(int[] variableValues)
      Returns:
      the estimated probability for the given cell. The order of the variable values is the order of the variables in getVariable().
    • getProb

      public double getProb(Proposition assertion)
      Returns:
      the estimated probability of the given proposition.
    • getConditionalProb

      public double getConditionalProb(Proposition assertion, Proposition condition)
      Returns:
      the estimated conditional probability for the given assertion conditional on the given condition.
    • getDataSet

      public DataSet getDataSet()
      Returns:
      the dataset that this is estimating probabilities for.
    • getVariables

      public List<Node> getVariables()
      Returns:
      the list of variables for the dataset that this is estimating probabilities for.