Class SemEstimator

java.lang.Object
edu.cmu.tetrad.sem.SemEstimator
All Implemented Interfaces:
TetradSerializable, Serializable

public final class SemEstimator extends Object implements TetradSerializable
Estimates a SemIm given a CovarianceMatrix and a SemPm. (A DataSet may be substituted for the CovarianceMatrix.)
Author:
Frank Wimberly, Ricardo Silva, Don Crimbchin, josephramsey
See Also:
  • Constructor Details

    • SemEstimator

      public SemEstimator(DataSet dataSet, SemPm semPm)
      Constructs a Sem Estimator that does default estimation.
      Parameters:
      semPm - a SemPm specifying the graph and parameterization for the model.
      dataSet - a DataSet, all of whose variables are contained in the given SemPm. (They are identified by name.)
    • SemEstimator

      public SemEstimator(ICovarianceMatrix covMatrix, SemPm semPm)
      Constructs a SEM estimator that does default estimation.
      Parameters:
      semPm - a SemPm specifying the graph and parameterization for the model.
      covMatrix - a CovarianceMatrix, all of whose variables are contained in the given SemPm. (They are identified by name.)
    • SemEstimator

      public SemEstimator(DataSet dataSet, SemPm semPm, SemOptimizer semOptimizer)
      Constructs a new SemEstimator that uses the specified optimizer.
      Parameters:
      semPm - a SemPm specifying the graph and parameterization for the model.
      dataSet - a DataSet, all of whose variables are contained in the given SemPm. (They are identified by name.)
      semOptimizer - the optimizer that optimizes the Sem.
    • SemEstimator

      public SemEstimator(ICovarianceMatrix covMatrix, SemPm semPm, SemOptimizer semOptimizer)
      Constructs a new SemEstimator that uses the specified optimizer.
      Parameters:
      semPm - a SemPm specifying the graph and parameterization for the model.
      covMatrix - a covariance matrix, all of whose variables are contained in the given SemPm. (They are identified by name.)
      semOptimizer - the optimizer that optimizes the Sem.
  • Method Details

    • serializableInstance

      public static SemEstimator serializableInstance()
      Generates a simple exemplar of this class to test serialization.
    • estimate

      public SemIm estimate()
      Runs the estimator on the data and SemPm passed in through the constructor.
    • getEstimatedSem

      public SemIm getEstimatedSem()
      Returns:
      the estimated SemIm. If the estimate method has not yet been called, null is returned.
    • getDataSet

      public DataSet getDataSet()
    • getSemPm

      public SemPm getSemPm()
    • getCovMatrix

      public ICovarianceMatrix getCovMatrix()
    • setSemOptimizer

      public void setSemOptimizer(SemOptimizer semOptimizer)
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      a string representation of the Sem.
    • setScoreType

      public void setScoreType(ScoreType scoreType)
    • setNumRestarts

      public void setNumRestarts(int numRestarts)