ObservationType
- Type of Observations handled by the HMM.@PublicationReference(author="William Turin", title="Unidirectional and Parallel Baum\u2013Welch Algorithms", type=Journal, publication="IEEE Transactions on Speech and Audio Processing", year=1998, url="http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=00725318") public class ParallelBaumWelchAlgorithm<ObservationType> extends BaumWelchAlgorithm<ObservationType> implements ParallelAlgorithm
Modifier and Type | Class and Description |
---|---|
protected static class |
ParallelBaumWelchAlgorithm.DistributionEstimatorTask<ObservationType>
Re-estimates the PDF from the gammas.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<ParallelBaumWelchAlgorithm.DistributionEstimatorTask<ObservationType>> |
distributionEstimatorTasks
Tasks for re-estimating the PDFs.
|
multicollection, sequenceGammas
DEFAULT_MAX_ITERATIONS, DEFAULT_REESTIMATE_INITIAL_PROBABILITY, distributionLearner, initialGuess, lastLogLikelihood, PERFORMANCE_NAME, reestimateInitialProbabilities, result
data, keepGoing
maxIterations
DEFAULT_ITERATION, iteration
Constructor and Description |
---|
ParallelBaumWelchAlgorithm()
Default constructor
|
ParallelBaumWelchAlgorithm(HiddenMarkovModel<ObservationType> initialGuess,
BatchLearner<java.util.Collection<? extends WeightedValue<? extends ObservationType>>,? extends ComputableDistribution<ObservationType>> distributionLearner,
boolean reestimateInitialProbabilities)
Creates a new instance of ParallelBaumWelchAlgorithm
|
Modifier and Type | Method and Description |
---|---|
protected java.util.ArrayList<ParallelBaumWelchAlgorithm.DistributionEstimatorTask<ObservationType>> |
createDistributionEstimatorTasks()
Creates the DistributionEstimatorTask
|
int |
getNumThreads()
Gets the number of threads in the thread pool.
|
java.util.concurrent.ThreadPoolExecutor |
getThreadPool()
Gets the thread pool for the algorithm to use.
|
protected boolean |
initializeAlgorithm()
Called to initialize the learning algorithm's state based on the
data that is stored in the data field.
|
void |
setThreadPool(java.util.concurrent.ThreadPoolExecutor threadPool)
Sets the thread pool for the algorithm to use.
|
protected java.util.ArrayList<ProbabilityFunction<ObservationType>> |
updateProbabilityFunctions(java.util.ArrayList<Vector> sequenceGammas)
Updates the probability function from the concatenated gammas from
all sequences
|
cleanupAlgorithm, clone, computeSequenceParameters, learn, step, updateInitialProbabilities, updateSequenceLogLikelihoods, updateTransitionMatrix
getDistributionLearner, getInitialGuess, getLastLogLikelihood, getPerformance, getReestimateInitialProbabilities, getResult, setDistributionLearner, setInitialGuess, setReestimateInitialProbabilities
getData, getKeepGoing, learn, setData, setKeepGoing, stop
getMaxIterations, isResultValid, setMaxIterations
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
getMaxIterations, setMaxIterations
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener
isResultValid
protected transient java.util.ArrayList<ParallelBaumWelchAlgorithm.DistributionEstimatorTask<ObservationType>> distributionEstimatorTasks
public ParallelBaumWelchAlgorithm()
public ParallelBaumWelchAlgorithm(HiddenMarkovModel<ObservationType> initialGuess, BatchLearner<java.util.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.public java.util.concurrent.ThreadPoolExecutor getThreadPool()
ParallelAlgorithm
getThreadPool
in interface ParallelAlgorithm
public void setThreadPool(java.util.concurrent.ThreadPoolExecutor threadPool)
ParallelAlgorithm
setThreadPool
in interface ParallelAlgorithm
threadPool
- Thread pool used for parallelization.public int getNumThreads()
ParallelAlgorithm
getNumThreads
in interface ParallelAlgorithm
protected boolean initializeAlgorithm()
AbstractAnytimeBatchLearner
initializeAlgorithm
in class BaumWelchAlgorithm<ObservationType>
protected java.util.ArrayList<ProbabilityFunction<ObservationType>> updateProbabilityFunctions(java.util.ArrayList<Vector> sequenceGammas)
BaumWelchAlgorithm
updateProbabilityFunctions
in class BaumWelchAlgorithm<ObservationType>
sequenceGammas
- Concatenated gammas from all sequencesprotected java.util.ArrayList<ParallelBaumWelchAlgorithm.DistributionEstimatorTask<ObservationType>> createDistributionEstimatorTasks()