Package edu.cmu.tetrad.bayes
Class BayesProperties
java.lang.Object
edu.cmu.tetrad.bayes.BayesProperties
Calculates some scores for Bayes nets as a whole.
- Author:
- josephramsey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classReturns the number of categories for the given variable. -
Constructor Summary
ConstructorsConstructorDescriptionBayesProperties(DataSet dataSet) Constructs a new BayesProperties object for the given data set. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetBic()Call after calling getLikelihoodP().doublegetChisq()Call after calling getLikelihoodP().doublegetDof()Call after calling getLikelihoodP().doubleCall after calling getLikelihoodP().getLikelihoodRatioP(Graph graph) Calculates the p-value of the graph with respect to the given data.intReturns the number of categories for the given variable.getVariable(String targetName) Returns the variable with the given name (assumed the target).
-
Constructor Details
-
BayesProperties
Constructs a new BayesProperties object for the given data set.- Parameters:
dataSet- The data set.
-
-
Method Details
-
getLikelihoodRatioP
Calculates the p-value of the graph with respect to the given data.- Parameters:
graph- The graph.- 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 number of categories for the given variable. -
getVariable
Returns the variable with the given name (assumed the target).
-