Package edu.cmu.tetrad.bayes
Class BayesProperties
java.lang.Object
edu.cmu.tetrad.bayes.BayesProperties
Calculates some scores for Bayes nets as a whole.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The LikelihoodRet class represents the result of a likelihood ratio test. -
Constructor Summary
ConstructorsConstructorDescriptionBayesProperties
(DataSet dataSet) Constructs a new BayesProperties object for the given data set. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getBic()
Call after calling getLikelihoodP().double
getChisq()
Call after calling getLikelihoodP().double
getDof()
Call after calling getLikelihoodP().double
Call after calling getLikelihoodP().getLikelihoodRatioP
(Graph graph0) Calculates the p-value of the graph with respect to the given data, against the complete model as an alternative.int
Returns the sample size.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, against the complete model as an alternative.- Parameters:
graph0
- The model to test.- 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 sample size.- Returns:
- The sample size.
-
getVariable
-