Package jazzparser :: Package misc :: Package raphsto :: Module train
[hide private]
[frames] | no frames]

Module train

source code

Unsupervised EM training for Raphael and Stoddard's chord labelling model.


Author: Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>

Classes [hide private]
  RaphstoBaumWelchTrainer
Class with methods to retrain a Raphsto model using the Baum-Welch EM algorithm.
  RaphstoBaumWelchUnigramTrainer
Class with methods to retrain a Raphsto model using the Baum-Welch EM algorithm.
Functions [hide private]
 
_sequence_updates(sequence, last_model, label_dom, state_ids, mode_ids, chord_ids, beat_ids, d_ids, d_func)
Evaluates the forward/backward probability matrices for a single sequence under the model that came from the previous iteration and returns matrices that contain the updates to be made to the distributions during this iteration.
source code
 
_sequence_updates_uni(sequence, last_model, label_dom, state_ids, beat_ids, d_ids, d_func)
Same as _sequence_updates, modified for unigram models.
source code
Variables [hide private]
  ADD_SMALL = 1e-06
  __package__ = 'jazzparser.misc.raphsto'
Function Details [hide private]

_sequence_updates(sequence, last_model, label_dom, state_ids, mode_ids, chord_ids, beat_ids, d_ids, d_func)

source code 

Evaluates the forward/backward probability matrices for a single sequence under the model that came from the previous iteration and returns matrices that contain the updates to be made to the distributions during this iteration.

This is wrapped up in a function so it can be run in parallel for each sequence. Once all sequences have been evaluated, the results are combined and model updated.