public class HSMMTimeAwareMultinomialEstimator extends HSMMMultinomialEstimator
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected int[] |
_hourOfDay
hour of day for input observations.
|
(package private) java.lang.String |
_method |
protected double[][][] |
At
Time-dependent transition probability matrix.
|
protected double[][][] |
Atlearned
The learned transition probability matrix: before completion strategy is applied.
|
TypedIOPort |
empiricalStartTimes
Array of estimated probability transition matrices for each hour.
|
protected static java.lang.String |
FORCE_SELF
Completion strategy for A set to forcing a self-transition.
|
protected static java.lang.String |
FORCE_ZERO
Completion strategy for A set to forcing a transition to state 0.
|
protected java.util.Set<int[]> |
incompleteCategories
Hour categories for which At has not enough information.
|
protected static java.lang.String |
INTERPOLATE
Completion strategy for A set to interpolation, that is, a uniform distribuition
on all states that have
Hamming distance <= 1 to the binary representation of the source state.
|
protected static java.lang.String |
NO_ACTION
No completion strategy.
|
protected static int |
NUM_CATEGORIES
Number of partitions in the probability transition matrix.
|
protected static java.lang.String |
SELF_AND_ZERO
Completion strategy for A set to self and zero transitions with equal probability.
|
TypedIOPort |
timestamps
Array of observation timestamps as UNIX timestamps.
|
Parameter |
transitionMatrixEstimationMethod
Transition Matrix partitioning options.
|
_B, _nCategories, clusters, emissionEstimates, nCategories, observationDimension, observationProbabilities, prior_new
_D, _D0, _dPriors0, _durationPriors, _etaDimension, _likelihoodHistory, _maxDuration, clusterAssignments, D_new, durationEstimates, durationPriorEstimates, durationProbabilities, maxStateDuration, priorDurationDistribution
_A0, _likelihood, _likelihoodThreshold, _nIterations, _nStates, _obsDimension, _observations, _priorIn, _priors, _randomize, _transitionMatrix, A0, input, likelihood, likelihoodOut, likelihoodThreshold, maxIterations, newEstimates, nStates, priorDistribution, priorEstimates, randomizeGuessVectors, transitionMatrix
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
HSMMTimeAwareMultinomialEstimator(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_calculateTransitionScheme(java.lang.String method,
int category)
Compute missing transition probabilities in the hourly transition matrix estimates.
|
protected void |
_learnAt()
Learn the transition probability matrix for each hour, from timestamped data.
|
void |
_sendEmpiricalMatrix()
Send the learned matrix to the output.
|
void |
attributeChanged(Attribute attribute)
React to a change in an attribute.
|
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace.
|
void |
fire()
Do nothing.
|
_checkForConvergence, _initializeEMParameters, _iterateEM, _updateEstimates, durationProbability, emissionProbability
_EMParameterEstimation, _initializeArrays, HSMMAlphaBetaRecursion, preinitialize
HMMAlphaBetaRecursion
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, 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, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, initialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public TypedIOPort timestamps
public Parameter transitionMatrixEstimationMethod
public TypedIOPort empiricalStartTimes
protected static final int NUM_CATEGORIES
protected static final java.lang.String INTERPOLATE
protected static final java.lang.String FORCE_SELF
protected static final java.lang.String FORCE_ZERO
protected static final java.lang.String NO_ACTION
protected static final java.lang.String SELF_AND_ZERO
protected double[][][] At
protected double[][][] Atlearned
protected java.util.Set<int[]> incompleteCategories
protected int[] _hourOfDay
java.lang.String _method
public HSMMTimeAwareMultinomialEstimator(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
NamedObj
attributeChanged
in class HSMMMultinomialEstimator
attribute
- The attribute that changed.IllegalActionException
- If the change is not acceptable
to this container (not thrown in this base class).public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
TypedAtomicActor
clone
in class HSMMMultinomialEstimator
workspace
- The workspace for the new object.java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void fire() throws IllegalActionException
AtomicActor
fire
in interface Executable
fire
in class HSMMMultinomialEstimator
IllegalActionException
- Not thrown in this base class.public void _sendEmpiricalMatrix() throws NoRoomException, IllegalActionException
protected void _learnAt()
protected void _calculateTransitionScheme(java.lang.String method, int category)
method
- Completion strategycategory
- Source category