| Trees | Indices | Help |
|
|---|
|
|
object --+
|
utils.nltk.ngram.baumwelch.BaumWelchTrainer --+
|
HPBaumWelchTrainer
Baum-Welch training for jazzparser.misc.chordlabel.HPChordLabeler models.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
OPTIONS = BaumWelchTrainer.OPTIONS+ [ModuleOption('initkey', f
|
|||
|
|||
|
Inherited from |
|||
|
|||
Stores a line in the history of the model to keep a record of training steps. |
This should be overridden by subclasses, but not by defining a static method on the class, since the function must be picklable. For this, it needs to be a top-level function. Then you can set the sequence_updates attribute to point to it (using staticmethod), as we have done in the default implementation.
|
Creates a mutable version of the given model. This mutable version will be the model that receives updates during training, as defined by update_model.
|
Creates empty arrays to hold the accumulated probabilities during training. The sizes will depend on self.model.
|
Returns a tuple of the dicts that map labels, emissions, etc to the indices of arrays to which they correspond. These will need to be different for non-standard models.
|
Callback for the sequence_updates processes that takes the updates from a single sequence and adds them onto the global update accumulators. The accumulators are stored as self.global_arrays.
|
Replaces the distributions of the saved model with the probabilities taken from the arrays of updates. self.model is expected to be made up of mutable distributions when this is called. |
Saves the model in self.model to disk. This may be called at the end of each iteration and will be called at the end of the whole training process. By default, does nothing. You don't have to put something in here, but you'll need to override this if you want the model to be saved during training before it gets return at the end.
|
|
|||
OPTIONS
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:57 2012 | http://epydoc.sourceforge.net |