SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions
spr_pylib.train.master.MasterTrainer Class Reference

Defines the trainer object that will perform the various training steps. More...

+ Inheritance diagram for spr_pylib.train.master.MasterTrainer:
+ Collaboration diagram for spr_pylib.train.master.MasterTrainer:

Public Member Functions

def __init__
 Constructor. More...
 
def mvg_init
 Create a new mvg file based on collected data (not yet used. More...
 
def tied
 Create + train models with tied gaussians (reduced semi-continuous) More...
 
def phtied
 Create + train models with gaussians tied within the monophones only (reduced semi-continuous) More...
 
def untied_new
 Create + train models with untied gaussians. More...
 
def untied
 Create + train models with untied gaussians. More...
 
def fvg
 Add a single full covariance matrix to the tied gaussian models. More...
 
def cdtree
 Create context dependent models by means of a descision tree. More...
 
def vitalign
 Create a new segmentation based on the model created in the previous training step. More...
 
def install
 Copy the most current model files to the specified location. More...
 

Detailed Description

Defines the trainer object that will perform the various training steps.

Constructor & Destructor Documentation

def spr_pylib.train.master.MasterTrainer.__init__ (   self,
  config 
)

Constructor.

Parameters
selfThe callee object.
configThe MasterConfig object holding all configuration data.

Member Function Documentation

def spr_pylib.train.master.MasterTrainer.mvg_init (   self,
  mvg_file,
  Ngauss,
  trk_file,
  siz_file 
)

Create a new mvg file based on collected data (not yet used.

probably wrong location)

Parameters
selfThe callee object.
mvg_fileThe destiantion file
NgaussNumber of Gaussians per mixture (int) or file name containing state dependent values
trk_fileThe collected data
siz_fileThe data partitioning
def spr_pylib.train.master.MasterTrainer.tied (   self,
  niter = 3,
  tng = "auto",
  mfpg = "auto",
  cfpg = "auto",
  ngps = "auto",
  mxszi = "auto",
  mxszs = "auto",
  ocs = "auto",
  ocv = "auto",
  _type = "tied" 
)

Create + train models with tied gaussians (reduced semi-continuous)

Parameters
selfThe callee object.
niterThe number of training iterations (excluding the initial segpass).
tngInitial gaussians : total number of gaussians (maximum).
mfpgInitial gaussians : create one gaussian per mfpg points.
cfpgInitial gaussians : collect at max cfpg points per gaussians to estimate.
ngpsInitial gaussians : create at max ngps gaussians for a state.
mxsziInitial HMM : make gaussians mixtures with mxszi gaussians per state.
mxszsBefore vitpass1 : limit the number of gaussians per state to mxszs .
ocsBefore vitpass1 : occupancy based culling of the gaussians weights.
ocvBefore vitpass2,3,... : occupancy based culling of the gaussians weights.
_typeInternal use only. Do not use.
def spr_pylib.train.master.MasterTrainer.phtied (   self,
  niter = 3,
  tng = "auto",
  mfpg = "auto",
  cfpg = "auto",
  ngps = "auto",
  mxszi = "auto",
  mxszs = "auto",
  ocs = "auto",
  ocv = "auto" 
)

Create + train models with gaussians tied within the monophones only (reduced semi-continuous)

Parameters
selfThe callee object.
niterThe number of training iterations (excluding the initial segpass).
tngInitial gaussians : total number of gaussians (maximum).
mfpgInitial gaussians : create one gaussian per mfpg points.
cfpgInitial gaussians : collect at max cfpg points per gaussians to estimate.
ngpsInitial gaussians : create at max ngps gaussians for a state.
mxsziInitial HMM : make gaussians mixtures with mxszi gaussians per state.
mxszsBefore vitpass1 : limit the number of gaussians per state to mxszs .
ocsBefore vitpass1 : occupancy based culling of the gaussians weights.
ocvBefore vitpass2,3,... : occupancy based culling of the gaussians weights.
def spr_pylib.train.master.MasterTrainer.untied_new (   self,
  niter = 3,
  tng = "auto",
  mfpg = "auto",
  cfpg = "auto",
  ngps = "auto",
  mxszi = "auto",
  mxszs = "auto",
  ocs = "auto",
  ocv = "auto" 
)

Create + train models with untied gaussians.

(Limited number of gaussians)

Parameters
selfThe callee object.
niterThe number of training iterations (excluding the initial segpass).
tngInitial gaussians : total number of gaussians (maximum).
mfpgInitial gaussians : create one gaussian per mfpg points.
cfpgInitial gaussians : collect at max cfpg points per gaussians to estimate.
ngpsInitial gaussians : create at max ngps gaussians for a state.
mxsziInitial HMM : make gaussians mixtures with mxszi gaussians per state.
mxszsBefore vitpass1 : limit the number of gaussians per state to mxszs .
ocsBefore vitpass1 : occupancy based culling of the gaussians weights.
ocvBefore vitpass2,3,... : occupancy based culling of the gaussians weights.
def spr_pylib.train.master.MasterTrainer.untied (   self,
  niter = 3,
  tng = "auto",
  mfpg = "auto",
  cfpg = "auto",
  ngps = "auto" 
)

Create + train models with untied gaussians.

(Fixed number of gaussians)

If ngps and mfpg conflict, a balancing act is done.

Parameters
selfThe callee object.
niterThe number of training iterations.
tngTotal number of gaussians (maximum).
mfpgLimit in the number of frames needed to make a gaussian.
cfpgCollect at max cfpg points per gaussians to estimate.
ngpsMake gaussians mixtures with ngps gaussians per state.
def spr_pylib.train.master.MasterTrainer.fvg (   self,
  niter = 3,
  ocv = "auto" 
)

Add a single full covariance matrix to the tied gaussian models.

The iterations specified with the niter argument will alternate between two different functionalities.

  • odd iteration : estimate the full covariance matrix and update the gaussian set
  • even iteration : re-estimate the mixture weights and gaussian set (vitpass)
Parameters
selfThe callee object.
niterThe number of training iterations.
ocvOccupancy based culling of the gaussians weights before a vitpass.
def spr_pylib.train.master.MasterTrainer.cdtree (   self,
  niter = 3,
  ocs = "auto",
  ocv = "auto",
  oci = "pct.4",
  dtmc = 512,
  dtlt = 512 
)

Create context dependent models by means of a descision tree.

Parameters
selfThe callee object.
niterThe number of training iterations (excluding the initial segpass with untied states).
ocsBefore vitpass1 : prune gaussians weights if occupancy is less than <p4>.
ocvBefore vitpass* : prune gaussians weights if occupancy is less than <p5>.
ociUntied model : occupancy based culling of the gaussians weights
dtmcDescision tree : minimum count.
dtltDescision tree : likelihood threshold
def spr_pylib.train.master.MasterTrainer.vitalign (   self)

Create a new segmentation based on the model created in the previous training step.

This can not be called as first step in a training setup.

Parameters
selfThe callee object.
def spr_pylib.train.master.MasterTrainer.install (   self,
  destdir = "result",
  name = "acmod" 
)

Copy the most current model files to the specified location.

Parameters
selfThe callee object
destdirThe optional result directory, relative to the base dir
nameThe optional name without extension for the various files