bob.trainer.GMMTrainer

class bob.trainer.GMMTrainer

Bases: bob.trainer._trainer.EMTrainerGMM

This class implements the E-step of the expectation-maximisation algorithm for a GMM Machine. See Section 9.2.2 of Bishop, “Pattern recognition and machine learning”, 2006

Raises an exception This class cannot be instantiated from Python

__init__()

Raises an exception This class cannot be instantiated from Python

Methods

__init__ Raises an exception This class cannot be instantiated from Python
compute_likelihood((EMTrainerGMM)self, …) Returns the likelihood.
e_step((EMTrainerGMM)self, …) Update the hidden variable distribution (or the sufficient statistics) given the Machine parameters.
finalize((EMTrainerGMM)self, …) This method is called after the EM algorithm
initialize((EMTrainerGMM)self, …) This method is called before the EM algorithm
m_step((EMTrainerGMM)self, …) Update the Machine parameters given the hidden variable distribution (or the sufficient statistics)
train((EMTrainerGMM)self, …) Train a machine using data

Attributes

convergence_threshold Convergence threshold
gmm_statistics The internal GMM statistics.
max_iterations Max iterations
compute_likelihood((EMTrainerGMM)self, (GMMMachine)machine) → float :

Returns the likelihood.

convergence_threshold

Convergence threshold

e_step((EMTrainerGMM)self, (GMMMachine)machine, (object)data) → None :

Update the hidden variable distribution (or the sufficient statistics) given the Machine parameters. Also, calculate the average output of the Machine given these parameters. Return the average output of the Machine across the dataset. The EM algorithm will terminate once the change in average_output is less than the convergence_threshold.

finalize((EMTrainerGMM)self, (GMMMachine)machine, (object)data) → None :

This method is called after the EM algorithm

gmm_statistics

The internal GMM statistics. Useful to parallelize the E-step.

initialize((EMTrainerGMM)self, (GMMMachine)machine, (object)data) → None :

This method is called before the EM algorithm

m_step((EMTrainerGMM)self, (GMMMachine)machine, (object)data) → None :

Update the Machine parameters given the hidden variable distribution (or the sufficient statistics)

max_iterations

Max iterations

train((EMTrainerGMM)self, (GMMMachine)machine, (object)data) → None :

Train a machine using data