bob.trainer.EMTrainerKMeans

class bob.trainer.EMTrainerKMeans

Bases: Boost.Python.instance

The base python class for all EM-based trainers.

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((EMTrainerKMeans)self, …) Returns the average min (square Euclidean) distance
e_step((EMTrainerKMeans)self, …) Update the hidden variable distribution (or the sufficient statistics) given the Machine parameters.
finalize((EMTrainerKMeans)self, …) This method is called after the EM algorithm
initialize((EMTrainerKMeans)arg1, …) This method is called before the EM algorithm
m_step((EMTrainerKMeans)self, …) Update the Machine parameters given the hidden variable distribution (or the sufficient statistics)
train((EMTrainerKMeans)self, …) Train a machine using data

Attributes

convergence_threshold Convergence threshold
max_iterations Max iterations
rng The Mersenne Twister mt19937 random generator used for the initialization of subspaces/arrays before the EM loop.
compute_likelihood((EMTrainerKMeans)self, (KMeansMachine)machine) → float :

Returns the average min (square Euclidean) distance

convergence_threshold

Convergence threshold

e_step((EMTrainerKMeans)self, (KMeansMachine)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((EMTrainerKMeans)self, (KMeansMachine)machine, (object)data) → None :

This method is called after the EM algorithm

initialize((EMTrainerKMeans)arg1, (KMeansMachine)machine, (object)data) → None :

This method is called before the EM algorithm

m_step((EMTrainerKMeans)self, (KMeansMachine)machine, (object)data) → None :

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

max_iterations

Max iterations

rng

The Mersenne Twister mt19937 random generator used for the initialization of subspaces/arrays before the EM loop.

train((EMTrainerKMeans)self, (KMeansMachine)machine, (object)data) → None :

Train a machine using data