Module mixture :: Class LabeledMixtureModel
[hide private]
[frames] | no frames]

Class LabeledMixtureModel

source code


Class for a mixture model containing the label constrained version of the E-Step See A. Schliep, C. Steinhoff, A. A. Schonhuth Robust inference of groups in gene expression time-courses using mixtures of HMMs Bioinformatics. 2004 Aug 4;20 Suppl 1:I283-I289 (Proceedings of the ISMB 2004). for details

Instance Methods [hide private]
 
__init__(self, G, pi, components, compFix=None, struct=0)
Constructor
source code
 
EM(self, data, max_iter, delta, silent=False, mix_pi=None, mix_posterior=None, tilt=0)
Reestimation of mixture parameters using the EM algorithm.
source code
 
EStep(self, data, mix_posterior=None, mix_pi=None, EStepParam=None)
Reestimation of mixture parameters using the EM algorithm.
source code
 
modelInitialization(self, data, rtype=1, missing_value=None)
Perform model initialization given a random assigment of the data to the models.
source code
 
classify(self, data, labels=None, entropy_cutoff=None, silent=0)
Classification of input 'data'.
source code

Inherited from MixtureModel: EStep_old, MStep, __copy__, __eq__, __str__, flatStr, formatData, identifiable, initStructure, isValid, mapEM, merge, minimalStructure, pdf, posteriorTraceback, printClusterEntropy, printStructure, printTraceback, randMaxEM, removeComponent, reorderComponents, sample, sampleDataSet, sampleDataSetLabels, sampleSet, sampleSetLabels, structureEM, sufficientStatistics, updateFreeParams, updateStructureGlobal, update_suff_p, validStructure

Method Details [hide private]

__init__(self, G, pi, components, compFix=None, struct=0)
(Constructor)

source code 

Constructor

Parameters:
  • G - number of components
  • pi - mixture weights
  • components - list of ProductDistribution objects, each entry is one component
  • compFix - list of optional flags for fixing components in the reestimation the following values are supported: 1 distribution parameters are fixed, 2 distribution parameters and mixture coefficients are fixed
  • struct - Flag for CSI structure, 0 = no CSI structure, 1 = CSI structure
Overrides: ProbDistribution.__init__
(inherited documentation)

EM(self, data, max_iter, delta, silent=False, mix_pi=None, mix_posterior=None, tilt=0)

source code 

Reestimation of mixture parameters using the EM algorithm. This method do some initial checking and call the EM from MixtureModel with the constrained labels E step

Parameters:
  • data - DataSet object
  • max_iter - maximum number of iterations
  • delta - minimal difference in likelihood between two iterations before convergence is assumed.
  • silent - 0/1 flag, toggles verbose output
  • mix_pi - [internal use only] necessary for the reestimation of mixtures as components
  • mix_posterior - [internal use only] necessary for the reestimation of mixtures as components
  • tilt - 0/1 flag, toggles the use of a deterministic annealing in the training
Returns:
tuple of posterior matrix and log-likelihood from the last iteration
Overrides: MixtureModel.EM

EStep(self, data, mix_posterior=None, mix_pi=None, EStepParam=None)

source code 

Reestimation of mixture parameters using the EM algorithm.

Parameters:
  • data - DataSet object
  • mix_pi - [internal use only] necessary for the reestimation of mixtures as components
  • mix_posterior - [internal use only] necessary for the reestimation of mixtures as components
  • EStepParam - additional paramenters for more complex EStep implementations, in this implementaion it is ignored
Returns:
tuple of log likelihood matrices and sum of log-likelihood of components
Overrides: MixtureModel.EStep

modelInitialization(self, data, rtype=1, missing_value=None)

source code 

Perform model initialization given a random assigment of the data to the models.

Parameters:
  • data - DataSet object
  • rtype - type of random assignments. 0 = fuzzy assingment 1 = hard assingment
  • missing_value - missing symbol to be ignored in parameter estimation (if applicable)
Returns:
posterior assigments
Overrides: MixtureModel.modelInitialization

classify(self, data, labels=None, entropy_cutoff=None, silent=0)

source code 

Classification of input 'data'. Assignment to mixture components by maximum likelihood over the component membership posterior. No parameter reestimation.

Parameters:
  • data - DataSet object
  • labels - optional sample IDs
  • entropy_cutoff - entropy threshold for the posterior distribution. Samples which fall above the threshold will remain unassigned
  • silent - 0/1 flag, toggles verbose output
Returns:
list of class labels
Overrides: MixtureModel.classify