Package edu.cmu.tetrad.bayes
Class IntAveDataSetProbs
java.lang.Object
edu.cmu.tetrad.bayes.IntAveDataSetProbs
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 Summary
ConstructorsConstructorDescriptionIntAveDataSetProbs
(DataSet dataSet) 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)
-
Constructor Details
-
IntAveDataSetProbs
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.
-