|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm
gov.sandia.cognition.algorithm.AbstractAnytimeAlgorithm<ResultType>
gov.sandia.cognition.learning.algorithm.AbstractAnytimeBatchLearner<DataType,HiddenMarkovModel<ObservationType>>
gov.sandia.cognition.learning.algorithm.hmm.AbstractBaumWelchAlgorithm<ObservationType,DataType>
ObservationType
- Type of Observations handled by the HMM.DataType
- Type of data (Collection of ObservationType, for instance)
sent to the learn method.public abstract class AbstractBaumWelchAlgorithm<ObservationType,DataType>
Partial implementation of the Baum-Welch algorithm.
Field Summary | |
---|---|
static int |
DEFAULT_MAX_ITERATIONS
Default maximum number of iterations, 100. |
static boolean |
DEFAULT_REESTIMATE_INITIAL_PROBABILITY
Default flag to re-estimate initial probabilities, true. |
protected BatchLearner<Collection<? extends WeightedValue<? extends ObservationType>>,? extends ComputableDistribution<ObservationType>> |
distributionLearner
Learner for the Distribution Functions of the HMM. |
protected HiddenMarkovModel<ObservationType> |
initialGuess
Initial guess for the iterations. |
protected double |
lastLogLikelihood
Last Log Likelihood of the iterations |
static String |
PERFORMANCE_NAME
Name of the performance statistic, "Log Likelihood". |
protected boolean |
reestimateInitialProbabilities
Flag to re-estimate the initial probability Vector. |
protected HiddenMarkovModel<ObservationType> |
result
Result of the Baum-Welch Algorithm |
Fields inherited from class gov.sandia.cognition.learning.algorithm.AbstractAnytimeBatchLearner |
---|
data, keepGoing |
Fields inherited from class gov.sandia.cognition.algorithm.AbstractAnytimeAlgorithm |
---|
maxIterations |
Fields inherited from class gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm |
---|
DEFAULT_ITERATION, iteration |
Constructor Summary | |
---|---|
AbstractBaumWelchAlgorithm(HiddenMarkovModel<ObservationType> initialGuess,
BatchLearner<Collection<? extends WeightedValue<? extends ObservationType>>,? extends ComputableDistribution<ObservationType>> distributionLearner,
boolean reestimateInitialProbabilities)
Creates a new instance of AbstractBaumWelchAlgorithm |
Method Summary | |
---|---|
AbstractBaumWelchAlgorithm<ObservationType,DataType> |
clone()
This makes public the clone method on the Object class and
removes the exception that it throws. |
BatchLearner<Collection<? extends WeightedValue<? extends ObservationType>>,? extends ComputableDistribution<ObservationType>> |
getDistributionLearner()
Getter for distributionLearner |
HiddenMarkovModel<ObservationType> |
getInitialGuess()
Getter for initialGuess. |
double |
getLastLogLikelihood()
Gets the log likelihood of the last completed step of the algorithm. |
NamedValue<Double> |
getPerformance()
Gets the name-value pair that describes the current performance of the algorithm. |
boolean |
getReestimateInitialProbabilities()
Getter for reestimateInitialProbabilities |
HiddenMarkovModel<ObservationType> |
getResult()
Gets the current result of the algorithm. |
void |
setDistributionLearner(BatchLearner<Collection<? extends WeightedValue<? extends ObservationType>>,? extends ComputableDistribution<ObservationType>> distributionLearner)
Setter for distributionLearner |
void |
setInitialGuess(HiddenMarkovModel<ObservationType> initialGuess)
Setter for initialGuess. |
void |
setReestimateInitialProbabilities(boolean reestimateInitialProbabilities)
Setter for reestimateInitialProbabilities |
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractAnytimeBatchLearner |
---|
cleanupAlgorithm, getData, getKeepGoing, initializeAlgorithm, learn, setData, setKeepGoing, step, stop |
Methods inherited from class gov.sandia.cognition.algorithm.AbstractAnytimeAlgorithm |
---|
getMaxIterations, isResultValid, setMaxIterations |
Methods inherited from class gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm |
---|
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gov.sandia.cognition.algorithm.AnytimeAlgorithm |
---|
getMaxIterations, setMaxIterations |
Methods inherited from interface gov.sandia.cognition.algorithm.IterativeAlgorithm |
---|
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener |
Methods inherited from interface gov.sandia.cognition.algorithm.StoppableAlgorithm |
---|
isResultValid |
Field Detail |
---|
public static final int DEFAULT_MAX_ITERATIONS
public static final boolean DEFAULT_REESTIMATE_INITIAL_PROBABILITY
public static final String PERFORMANCE_NAME
protected BatchLearner<Collection<? extends WeightedValue<? extends ObservationType>>,? extends ComputableDistribution<ObservationType>> distributionLearner
protected HiddenMarkovModel<ObservationType> result
protected HiddenMarkovModel<ObservationType> initialGuess
protected double lastLogLikelihood
protected boolean reestimateInitialProbabilities
Constructor Detail |
---|
public AbstractBaumWelchAlgorithm(HiddenMarkovModel<ObservationType> initialGuess, BatchLearner<Collection<? extends WeightedValue<? extends ObservationType>>,? extends ComputableDistribution<ObservationType>> distributionLearner, boolean reestimateInitialProbabilities)
initialGuess
- Initial guess for the iterations.distributionLearner
- Learner for the Distribution Functions of the HMM.reestimateInitialProbabilities
- Flag to re-estimate the initial probability Vector.Method Detail |
---|
public AbstractBaumWelchAlgorithm<ObservationType,DataType> clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.
clone
in interface CloneableSerializable
clone
in class AbstractAnytimeBatchLearner<DataType,HiddenMarkovModel<ObservationType>>
public NamedValue<Double> getPerformance()
MeasurablePerformanceAlgorithm
getPerformance
in interface MeasurablePerformanceAlgorithm
public HiddenMarkovModel<ObservationType> getResult()
AnytimeAlgorithm
getResult
in interface AnytimeAlgorithm<HiddenMarkovModel<ObservationType>>
public HiddenMarkovModel<ObservationType> getInitialGuess()
public void setInitialGuess(HiddenMarkovModel<ObservationType> initialGuess)
initialGuess
- Initial guess for the iterations.public boolean getReestimateInitialProbabilities()
public void setReestimateInitialProbabilities(boolean reestimateInitialProbabilities)
reestimateInitialProbabilities
- Flag to re-estimate the initial probability Vector.public BatchLearner<Collection<? extends WeightedValue<? extends ObservationType>>,? extends ComputableDistribution<ObservationType>> getDistributionLearner()
public void setDistributionLearner(BatchLearner<Collection<? extends WeightedValue<? extends ObservationType>>,? extends ComputableDistribution<ObservationType>> distributionLearner)
distributionLearner
- Learner for the Distribution Functions of the HMM.public double getLastLogLikelihood()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |