public class HMMGaussianEstimator extends ParameterEstimator
This actor implements a parameter estimator for Hidden Markov Models with Gaussian Emissions. The base class ParameterEstimator performs the parameter estimation and the HMMGaussianEstimator class contains density-specific methods for Gaussian emission calculations and produces the relevant estimates at its output ports.
The output ports for a Gaussian HMM model are the mean<\i> and the standardDeviation<\i> vectors of the possible hidden states in addition to the HMM parameters independent from the emission density: transitionMatrix<\i> . T he mean<\i> is a double array output containing the mean estimates and sigma is a double array output containing standard deviation estimates of each mixture component. If the modelType<\i> is HMM, then an additional output, transitionMatrix<\i> is provided, which is an estimate of the transition matrix governing the Markovian process representing the hidden state evolution. If the modelType<\i> is MM, this port outputs a double array with the prior probability estimates of the mixture components.
The user-defined parameters are initial guesses for the model parameters, given by m0, the mean vector guess, s0, the standard deviation vector guess, prior, the prior state distribution guess, A0, the transition matrix guess ( only for HMM). iterations is the number of EM iterations allowed until convergence. If, during iteration, the conditional log-likelihood of the observed sequence given the parameter estimates converges to a value within likelihoodThreshold, the parameter estimation stops iterating and delivers the parameter estimates.
| Red (ilgea) |
ParameterEstimator.BusAttributesEntity.ContainedObjectsIterator| Modifier and Type | Field and Description |
|---|---|
TypedIOPort |
mean |
Parameter |
meanVectorGuess |
TypedIOPort |
standardDeviation |
Parameter |
standardDeviationGuess |
_A0, _batchSize, _likelihood, _likelihoodThreshold, _nIterations, _nStates, _observations, _observedTokens, _priorIn, _priors, _randomize, _transitionMatrix, A0, batchSize, input, likelihood, likelihoodThreshold, maxIterations, newEstimates, nStates, priorDistribution, priorEstimates, randomizeGuessVectors, serviceTimeMultiplicationFactor, transitionMatrix_parameters, _tokenCount_typesValid_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSdecoratorHighlightColorNameCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
HMMGaussianEstimator(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
_checkForConvergence(int iterations) |
protected void |
_initializeEMParameters() |
protected void |
_iterateEM() |
protected void |
_updateEstimates() |
void |
attributeChanged(Attribute attribute)
If the attribute is serviceTime, then ensure that the value
is non-negative.
|
java.lang.Object |
clone(Workspace workspace)
Clone this actor into the specified workspace.
|
protected double |
emissionProbability(double y,
int hiddenState) |
void |
fire()
Send first token in the queue to the target receiver.
|
_EMParameterEstimation, _initializeArrays, _scheduleRefire, createDecoratorAttributes, createIntermediateReceiver, HMMAlphaBetaRecursion, HMMAlphaBetaRecursionNonNormalized, initialize, postfire, reset, sendToken, setContainer_sendToReceiver, decoratedObjects, isGlobalDecorator, registerListener, sendCommunicationEvent_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, stop, stopFire, terminate, wrapup_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdescription, getContainer, getDisplayName, getFullName, getName, getName, setNamecreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListisFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminateaddInitializable, preinitialize, removeInitializable, wrapupgetDerivedLevel, getDerivedList, propagateValuepublic TypedIOPort mean
public TypedIOPort standardDeviation
public Parameter meanVectorGuess
public Parameter standardDeviationGuess
public HMMGaussianEstimator(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container - The container.name - The name of this actorIllegalActionException - If the actor cannot be contained
by the proposed container.NameDuplicationException - If the container already has an
actor with this name.public void attributeChanged(Attribute attribute) throws IllegalActionException
ParameterEstimatorattributeChanged in class ParameterEstimatorattribute - The attribute that changed.IllegalActionException - If the service time is negative.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
ParameterEstimatorclone in class ParameterEstimatorworkspace - The workspace for the cloned object.java.lang.CloneNotSupportedException - If cloned ports cannot have
as their container the cloned entity (this should not occur), or
if one of the attributes cannot be cloned.NamedObj.exportMoML(Writer, int, String),
NamedObj.setDeferringChangeRequests(boolean)public void fire()
throws IllegalActionException
ParameterEstimatorfire in interface Executablefire in class ParameterEstimatorIllegalActionException - Not thrown in this base class.protected double emissionProbability(double y,
int hiddenState)
emissionProbability in class ParameterEstimatorprotected boolean _checkForConvergence(int iterations)
_checkForConvergence in class ParameterEstimatorprotected void _initializeEMParameters()
_initializeEMParameters in class ParameterEstimatorprotected void _iterateEM()
_iterateEM in class ParameterEstimatorprotected void _updateEstimates()
_updateEstimates in class ParameterEstimator