Adapt_AM_TreeNode Class Reference

This class represents a single cluster in the SMAPLR adaptation method. method. Each cluster is structured in a node of a tree, hence the name Adapt_AM_TreeNode. Each node has access to a number of Gaussians of the acoustic models. The class creates an adaptation matrix using MAPLR adaptation and passes its matrix as M-matrix to its children. More...

List of all members.


Public Member Functions

 Adapt_AM_TreeNode (int dim)
 ~Adapt_AM_TreeNode ()
int split (int depth)
void setHelperMatrices_1 (PhoneModel **models, int numberOfModels, bool doSil)
void setHelperMatrices_1 (PhoneModel **models, int numberOfModels)
void setHelperMatrices_2 ()

Public Attributes

double W [ADAPT_DEFAULT_VECTORSIZE][ADAPT_DEFAULT_VECTORSIZE+1]
 The adaptation matrix.
double M [ADAPT_DEFAULT_VECTORSIZE][ADAPT_DEFAULT_VECTORSIZE+1]
 Prior matrix (I at top, otherwise the W matrix of parent).
double Z [ADAPT_DEFAULT_VECTORSIZE][ADAPT_DEFAULT_VECTORSIZE+1]
 Helper matrix for calculating W.
double AUGMENTED_ALL [ADAPT_DEFAULT_VECTORSIZE *(ADAPT_DEFAULT_VECTORSIZE+1)*(ADAPT_DEFAULT_VECTORSIZE+2)]
 All data from the member-gaussians.
GaussianmeanGaussian
 The mean Gaussian is used for splitting the cluster.
Adapt_AM_TreeNodeparent
 The parent will deliver the M matrix.
Adapt_AM_TreeNodechildLeft
 The gaussians of the children are also member of this cluster.
Adapt_AM_TreeNodechildRight
 The gaussians of the children are also member of this cluster.
VectorvarTrans
double varDenom
double denominator

Protected Member Functions

void iterate_setHelperMatrices_1 ()

Protected Attributes

double C_factor
int dimensions

Detailed Description

This class represents a single cluster in the SMAPLR adaptation method. method. Each cluster is structured in a node of a tree, hence the name Adapt_AM_TreeNode. Each node has access to a number of Gaussians of the acoustic models. The class creates an adaptation matrix using MAPLR adaptation and passes its matrix as M-matrix to its children.

The description of the general order of method-calls can be found in the description of the Adapt_AM class.


Constructor & Destructor Documentation

Adapt_AM_TreeNode::Adapt_AM_TreeNode ( int  dim  ) 

The constructor checks the corectness of some pre-compiler settings (defines) and initialises the augmentation matrix for this tree node. The child-nodes are NULL.

References AUG_P, AUG_P_PLUS_ONE, AUG_X, AUG_Y, AUG_Y_TIMES_VECTOR, AUGMENTED_ALL, AUGMENTED_MATRIX_SIZE, C_factor, childLeft, childRight, denominator, dimensions, M, meanGaussian, parent, Vector::setAllValues(), varDenom, varTrans, and W.

Referenced by split().

Here is the call graph for this function:

Adapt_AM_TreeNode::~Adapt_AM_TreeNode (  ) 

The destructor deletes its children and its mean-Gaussian vector.

References childLeft, childRight, meanGaussian, and varTrans.


Member Function Documentation

void Adapt_AM_TreeNode::iterate_setHelperMatrices_1 (  )  [protected]

This method will go iterativly into the child nodes and then add the statistics of these nodes to the statistics of the parent node (left and right child statistics are added). The top node contains the statistics from all gaussians of all models.

References AUGMENTED_ALL, AUGMENTED_MATRIX_SIZE, childLeft, childRight, iterate_setHelperMatrices_1(), and parent.

Referenced by iterate_setHelperMatrices_1(), and setHelperMatrices_1().

Here is the call graph for this function:

void Adapt_AM_TreeNode::setHelperMatrices_1 ( PhoneModel **  models,
int  numberOfModels 
)

The first helper matrix contains the statistics of all acoustic models that are a member of this tree node (cluster). This method calls the PhoneModel::adapt_setHelperMatrices() method of all acoustic models. This method will call MixGaussian::MixGaussian() for each mixed gaussian (triphone model) and this method will call Gaussian::adapt_setHelperMatrices() for each single Gaussian in the model. Each Gaussian will then add its statistics to its own Adapt_AM_TreeNode object. Therefore, PhoneModel::adapt_setNode() must be called at least once for each model.

After adding the model statistics, iterate_setHelperMatrices_1() is called to iterate the statistics from the leaf-nodes into the helper matrices of the parent nodes.

References PhoneModel::adapt_setHelperMatrices(), and iterate_setHelperMatrices_1().

Here is the call graph for this function:

void Adapt_AM_TreeNode::setHelperMatrices_1 ( PhoneModel **  models,
int  numberOfModels,
bool  doSil 
)

The first helper matrix contains the statistics of all acoustic models that are a member of this tree node (cluster). This method calls the PhoneModel::adapt_setHelperMatrices() method of all acoustic models. This method will call MixGaussian::MixGaussian() for each mixed gaussian (triphone model) and this method will call Gaussian::adapt_setHelperMatrices() for each single Gaussian in the model. Each Gaussian will then add its statistics to its own Adapt_AM_TreeNode object. Therefore, PhoneModel::adapt_setNode() must be called at least once for each model.

After adding the model statistics, iterate_setHelperMatrices_1() is called to iterate the statistics from the leaf-nodes into the helper matrices of the parent nodes.

References PhoneModel::adapt_setHelperMatrices(), and iterate_setHelperMatrices_1().

Referenced by Adapt_AM::Adapt_AM(), ShoutPrepareAdapt::adaptingModel(), and Adapt_Segmenter::adaptModel().

Here is the call graph for this function:

void Adapt_AM_TreeNode::setHelperMatrices_2 (  ) 

See the SMAPLR documentation for more information on the mathimatics used in this method. This method calulates the adaptation matrix (W) and copies this matrix to the M matrix of its child-nodes. During the calculation of W, the helper matrices (AUGMENTED_ALL) need to be filled by the setHelperMatrices_1() method.

References AUG_X, AUG_Y, AUGMENTED_ALL, C_factor, childLeft, childRight, dimensions, M, setHelperMatrices_2(), and W.

Referenced by Adapt_AM::Adapt_AM(), ShoutPrepareAdapt::adaptingModel(), Adapt_Segmenter::adaptModel(), and setHelperMatrices_2().

Here is the call graph for this function:

int Adapt_AM_TreeNode::split ( int  depth  ) 

This method will train a Gaussian-model with the statistics of all acoustic models. These statistics (for now the mean vector of each Gaussian) are obtained with setHelperMatrices_1(). The resulting Gaussian is split in two and its variance is multiplied with 1.2. The new created child-nodes will use these two Gaussians as meanGaussian. The samples are devided betweeen the two child-nodes (the sample will be added to the node which mean vector is closest to the sample). split() will return the amount of added child nodes. It will not split a node when the number of samples is less than ADAPT_MIN_GAUSSIANS_PER_NODE.

References Adapt_AM_TreeNode(), C_factor, childLeft, childRight, denominator, dimensions, meanGaussian, parent, Gaussian::shiftMean(), split(), and Gaussian::trainFinish().

Referenced by Adapt_AM::Adapt_AM(), and split().

Here is the call graph for this function:


Member Data Documentation

double Adapt_AM_TreeNode::AUGMENTED_ALL[ADAPT_DEFAULT_VECTORSIZE *(ADAPT_DEFAULT_VECTORSIZE+1)*(ADAPT_DEFAULT_VECTORSIZE+2)]

double Adapt_AM_TreeNode::M[ADAPT_DEFAULT_VECTORSIZE][ADAPT_DEFAULT_VECTORSIZE+1]

Prior matrix (I at top, otherwise the W matrix of parent).

Referenced by Adapt_AM_TreeNode(), and setHelperMatrices_2().

The parent will deliver the M matrix.

Referenced by Adapt_AM_TreeNode(), iterate_setHelperMatrices_1(), and split().

double Adapt_AM_TreeNode::W[ADAPT_DEFAULT_VECTORSIZE][ADAPT_DEFAULT_VECTORSIZE+1]

The adaptation matrix.

Referenced by Gaussian::adapt_adapt(), Adapt_AM_TreeNode(), and setHelperMatrices_2().

double Adapt_AM_TreeNode::Z[ADAPT_DEFAULT_VECTORSIZE][ADAPT_DEFAULT_VECTORSIZE+1]

Helper matrix for calculating W.