Package edu.cmu.tetrad.sem
Class SemOptimizerEm
java.lang.Object
edu.cmu.tetrad.sem.SemOptimizerEm
- All Implemented Interfaces:
- SemOptimizer,- TetradSerializable,- Serializable
Optimizes a DAG SEM with hidden variables using expectation-maximization. IT SHOULD NOT BE USED WITH SEMs THAT ARE
 NOT DAGS. For DAGs without hidden variables, SemOptimizerRegression should be more efficient.
- Version:
- $Id: $Id
- Author:
- Ricardo Silva, josephramsey Cleanup, modernization.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the number of restarts for the optimization process.voidOptimizes an unoptimized Sem object by minimizing the chi-square statistic.static SemOptimizerEmGenerates a simple exemplar of this class to test serialization.voidsetNumRestarts(int numRestarts) setNumRestarts.toString()toString.
- 
Constructor Details- 
SemOptimizerEmpublic SemOptimizerEm()Constructor for SemOptimizerEm. 
 
- 
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.- Returns:
- a SemOptimizerEmobject
 
- 
optimizeOptimizes an unoptimized Sem object by minimizing the chi-square statistic.- Specified by:
- optimizein interface- SemOptimizer
- Parameters:
- semIm- The unoptimized Sem object to be optimized.
- Throws:
- NullPointerException- If the sample covariance matrix has not been set.
- IllegalArgumentException- If the sample covariance matrix contains missing values.
- RuntimeException- If an error occurs during optimization.
 
- 
getNumRestartspublic int getNumRestarts()Returns the number of restarts for the optimization process.- Specified by:
- getNumRestartsin interface- SemOptimizer
- Returns:
- The number of restarts for the optimization process.
 
- 
setNumRestartspublic void setNumRestarts(int numRestarts) setNumRestarts. - Specified by:
- setNumRestartsin interface- SemOptimizer
- Parameters:
- numRestarts- a int
 
- 
toStringtoString. 
 
-