D
- a StatisticalDataStructure-derived classpublic abstract class AbstractStatisticalModel<D extends StatisticalDataStructure> extends java.lang.Object implements StatisticalModel<D>
Modifier and Type | Field and Description |
---|---|
protected CompositeLogLikelihood |
completeLLK
The complete model likelihood.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractStatisticalModel(DataSet dataSet)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
doEstimation()
This method computes the parameter estimates.
|
CompositeLogLikelihood |
getCompleteLogLikelihood()
This method returns the model log-likelihood function.
|
double |
getConvergenceCriterion()
This method returns the value of the convergence criterion.
|
D |
getDataStructure()
This method returns the data structure.
|
protected abstract D |
getDataStructureFromDataSet(DataSet dataSet)
This method returns the appropriate StatisticalDataStructure from the dataSet.
|
Estimator |
getEstimator()
This method returns the optimizer of the log-likelihood function.
|
java.lang.String |
getModelDefinition()
This method returns the model definition as entered by the user.
|
protected java.lang.Object |
getOptimizerParameters() |
void |
getSummary()
This method returns the results of the fit on screen.
|
protected abstract Estimator |
instantiateDefaultEstimator()
This method defines the default optimizer which is to be specific to the derived classes.
|
protected abstract void |
setCompleteLLK()
This method sets the log-likelihood function of the model.
|
void |
setConvergenceCriterion(double convergenceCriterion)
This method sets the convergence criterion.
|
protected void |
setModelDefinition(java.lang.String modelDefinition)
This method sets the model definition and computes the appropriate matrix from the data.
|
void |
setOptimizer(Estimator optimizer)
This method sets the optimizer for the model.
|
void |
setOptimizerParameters(java.lang.Object optimizerParameters)
This method sets the parameter for the optimizer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameters, getPredicted, getResiduals, setParameters
protected CompositeLogLikelihood completeLLK
protected AbstractStatisticalModel(DataSet dataSet)
protected abstract D getDataStructureFromDataSet(DataSet dataSet)
dataSet
- a DataSet instancepublic CompositeLogLikelihood getCompleteLogLikelihood()
StatisticalModel
getCompleteLogLikelihood
in interface StatisticalModel<D extends StatisticalDataStructure>
protected abstract void setCompleteLLK()
public void setOptimizer(Estimator optimizer)
optimizer
- an Optimizer instancepublic Estimator getEstimator()
StatisticalModel
getEstimator
in interface StatisticalModel<D extends StatisticalDataStructure>
public D getDataStructure()
StatisticalModel
getDataStructure
in interface StatisticalModel<D extends StatisticalDataStructure>
protected abstract Estimator instantiateDefaultEstimator()
public void setConvergenceCriterion(double convergenceCriterion)
convergenceCriterion
- a doublepublic double getConvergenceCriterion()
StatisticalModel
getConvergenceCriterion
in interface StatisticalModel<D extends StatisticalDataStructure>
public void setOptimizerParameters(java.lang.Object optimizerParameters)
optimizerParameters
- protected java.lang.Object getOptimizerParameters()
public void doEstimation()
StatisticalModel
doEstimation
in interface StatisticalModel<D extends StatisticalDataStructure>
public void getSummary()
StatisticalModel
getSummary
in interface StatisticalModel<D extends StatisticalDataStructure>
public java.lang.String getModelDefinition()
StatisticalModel
getModelDefinition
in interface StatisticalModel<D extends StatisticalDataStructure>
protected void setModelDefinition(java.lang.String modelDefinition) throws StatisticalDataException
modelDefinition
- a String that defines the modelStatisticalDataException