Package edu.cmu.tetrad.bayes
Class DirichletDataSetProbs
java.lang.Object
edu.cmu.tetrad.bayes.DirichletDataSetProbs
Estimates probabilities directly from data on the fly using maximum likelihood method.
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionDirichletDataSetProbs
(DataSet dataSet, double symmValue) Creates a cell count table for the given data set. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getCellProb
(int[] variableValues) double
getConditionalProb
(Proposition assertion, Proposition condition) double
getProb
(Proposition assertion) boolean
True iff bounds checking is performed on variable values indices.void
setBoundsEnforced
(boolean boundsEnforced) True iff bounds checking is performed on variable values indices.
-
Constructor Details
-
DirichletDataSetProbs
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
- Returns:
- the estimated probability of the given proposition.
-
getConditionalProb
- Returns:
- the estimated conditional probability for the given assertion conditional on the given condition.
-
getDataSet
- Returns:
- the dataset that this is estimating probabilities for.
-
getVariables
- Returns:
- the list of variables for the dataset that this is estimating probabilities for.
-
isBoundsEnforced
public boolean isBoundsEnforced()True iff bounds checking is performed on variable values indices. -
setBoundsEnforced
public void setBoundsEnforced(boolean boundsEnforced) True iff bounds checking is performed on variable values indices.
-