Package edu.cmu.tetrad.bayes
Class StoredCellProbsObs
java.lang.Object
edu.cmu.tetrad.bayes.StoredCellProbsObs
- All Implemented Interfaces:
TetradSerializable
,Serializable
Creates a table of stored cell probabilities for the given list of variables. Since for a moderate number of variables and for a moderate number of values per variables this could get to be a very large table, it might not be a good idea to use this class except for unit testing.> 0
- Author:
- josephramsey
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
createCellTable
(MlBayesIm bayesIm) void
createCellTable
(MlBayesImObs bayesIm) double
getCellProb
(int[] variableValues) double
getConditionalProb
(Proposition assertion, Proposition condition) int
double
getProb
(Proposition assertion) int[]
getVariableValues
(int rowIndex) static StoredCellProbsObs
Generates a simple exemplar of this class to test serialization.void
setCellProbability
(int[] variableValues, double probability) toString()
-
Constructor Details
-
StoredCellProbsObs
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization. -
clearCellTable
public void clearCellTable() -
createCellTable
-
createCellTable
-
getCellProb
public double getCellProb(int[] variableValues) - Returns:
- the probability for the given cell, specified as a particular combination of variable values, for the list of variables (in order) returned by get
-
getProb
-
getConditionalProb
-
getVariables
-
getNumRows
public int getNumRows() -
toString
-
getVariableValues
public int[] getVariableValues(int rowIndex) -
setCellProbability
public void setCellProbability(int[] variableValues, double probability)
-