ObservationType - Type of observations handled by the algorithmpublic class ParallelDirichletProcessMixtureModel<ObservationType> extends DirichletProcessMixtureModel<ObservationType> implements ParallelAlgorithm
| Modifier and Type | Class and Description |
|---|---|
protected class |
ParallelDirichletProcessMixtureModel.ClusterUpdaterTask
Tasks that update the values of the clusters for Gibbs sampling
|
static class |
ParallelDirichletProcessMixtureModel.DPMMAssignments
Assignments from the DPMM
|
protected class |
ParallelDirichletProcessMixtureModel.ObservationAssignmentTask
Task that assign observations to cluster indices
|
DirichletProcessMixtureModel.DPMMCluster<ObservationType>, DirichletProcessMixtureModel.DPMMLogConditional, DirichletProcessMixtureModel.MultivariateMeanCovarianceUpdater, DirichletProcessMixtureModel.MultivariateMeanUpdater, DirichletProcessMixtureModel.Sample<ObservationType>, DirichletProcessMixtureModel.Updater<ObservationType>| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<ParallelDirichletProcessMixtureModel.ObservationAssignmentTask> |
assignmentTasks
Tasks that assign observations to clusters
|
protected java.util.ArrayList<ParallelDirichletProcessMixtureModel.ClusterUpdaterTask> |
clusterUpdaterTasks
Tasks that update the values of the clusters for Gibbs sampling
|
alphaInverseSampler, clusterWeights, conditionalPriorPredictive, DEFAULT_ALPHA, DEFAULT_NUM_INITIAL_CLUSTERS, DEFAULT_REESTIMATE_ALPHA, etaSampler, initialAlpha, reestimateAlpha, updatercurrentParameter, DEFAULT_NUM_SAMPLES, previousParameter, randomdata, keepGoingmaxIterationsDEFAULT_ITERATION, iteration| Constructor and Description |
|---|
ParallelDirichletProcessMixtureModel()
Creates a new instance of ParallelDirichletProcessMixtureModel
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.ArrayList<java.util.Collection<ObservationType>> |
assignObservationsToClusters(int K,
DirichletProcessMixtureModel.DPMMLogConditional logConditional)
Assigns observations to each of the K clusters,
plus the as-yet-uncreated new cluster
|
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.
|
void |
setThreadPool(java.util.concurrent.ThreadPoolExecutor threadPool)
Sets the thread pool for the algorithm to use.
|
protected java.util.ArrayList<DirichletProcessMixtureModel.DPMMCluster<ObservationType>> |
updateClusters(java.util.ArrayList<java.util.Collection<ObservationType>> clusterAssignments)
Update each cluster according to the data assigned to it
|
assignObservationToCluster, clone, createCluster, createInitialLearnedObject, getInitialAlpha, getNumInitialClusters, getReestimateAlpha, getUpdater, mcmcUpdate, setInitialAlpha, setNumInitialClusters, setReestimateAlpha, setUpdater, updateAlphacleanupAlgorithm, getBurnInIterations, getCurrentParameter, getIterationsPerSample, getPreviousParameter, getRandom, getResult, initializeAlgorithm, setBurnInIterations, setCurrentParameter, setIterationsPerSample, setRandom, setResult, stepgetData, getKeepGoing, learn, setData, setKeepGoing, stopgetMaxIterations, isResultValid, setMaxIterationsaddIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListenersequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclonelearngetMaxIterations, setMaxIterationsaddIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListenerisResultValid, stopprotected transient java.util.ArrayList<ParallelDirichletProcessMixtureModel.ObservationAssignmentTask> assignmentTasks
protected transient java.util.ArrayList<ParallelDirichletProcessMixtureModel.ClusterUpdaterTask> clusterUpdaterTasks
public ParallelDirichletProcessMixtureModel()
public int getNumThreads()
ParallelAlgorithmgetNumThreads in interface ParallelAlgorithmpublic java.util.concurrent.ThreadPoolExecutor getThreadPool()
ParallelAlgorithmgetThreadPool in interface ParallelAlgorithmpublic void setThreadPool(java.util.concurrent.ThreadPoolExecutor threadPool)
ParallelAlgorithmsetThreadPool in interface ParallelAlgorithmthreadPool - Thread pool used for parallelization.protected java.util.ArrayList<java.util.Collection<ObservationType>> assignObservationsToClusters(int K, DirichletProcessMixtureModel.DPMMLogConditional logConditional)
DirichletProcessMixtureModelassignObservationsToClusters in class DirichletProcessMixtureModel<ObservationType>K - Number of clusterslogConditional - The log of the conditional.protected java.util.ArrayList<DirichletProcessMixtureModel.DPMMCluster<ObservationType>> updateClusters(java.util.ArrayList<java.util.Collection<ObservationType>> clusterAssignments)
DirichletProcessMixtureModelupdateClusters in class DirichletProcessMixtureModel<ObservationType>clusterAssignments - Observations assigned to each cluster