Package edu.cmu.tetrad.bayes
Class EmBayesEstimator
java.lang.Object
edu.cmu.tetrad.bayes.EmBayesEstimator
Estimates parameters of the given Bayes net from the given data using maximum likelihood method.
- Version:
- $Id: $Id
- Author:
- Frank Wimberly based on related classes by Shane Harwood, Joseph Ramsey
-
Constructor Summary
ConstructorsConstructorDescriptionEmBayesEstimator
(BayesIm inputBayesIm, DataSet dataSet) Constructor for EmBayesEstimator.EmBayesEstimator
(BayesPm bayesPm, DataSet dataSet) Provides methods for estimating a Bayes IM from an existing BayesIM and a discrete dataset using EM (Expectation Maximization). -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fieldestimatedIm
.getMixedDataSet.maximization
(double threshhold) This method iteratively estimates the parameters of the Bayes net using the dataset until the parameters don't change.
-
Constructor Details
-
EmBayesEstimator
Provides methods for estimating a Bayes IM from an existing BayesIM and a discrete dataset using EM (Expectation Maximization). The data columns in the given data must be equal to a variable in the given Bayes IM but the latter may contain variables which don't occur in the dataset (latent variables). The first argument of the constructoris the BayesPm whose graph contains latent and observed variables. The second is the dataset of observed variables; missing value codes may be present. -
EmBayesEstimator
-
-
Method Details
-
maximization
This method iteratively estimates the parameters of the Bayes net using the dataset until the parameters don't change. That is, the newly estimated parameters are used in the estimate method to produce even more accurate parameters (with respect to the dataset) etc. The threshhold is compared to the distance between successive parameter sets and when the change is less than the threshhold, the process is considered to have converged. The distance between successive Bayes nets is the Euclidean distance between vectors of sequences of their parameters. See the BayesImDistanceFunction class for details.- Parameters:
threshhold
- a double- Returns:
- a
BayesIm
object
-
getMixedDataSet
-
getEstimatedIm
-