libak  0.4.0
Functions
CMLLR adaptation
Algorithms

Functions

void ak_cmllr_adapt_fea (akCMLLR *cmllr, const akFea *fea_in, akFea *fea_out)
 Adapt a feature sequence.
void ak_cmllr_free (akCMLLR *cmllr)
 Frees memory.
akFloat ak_cmllr_get_lv_constant (const akCMLLR *cmllr, const akCMlogCounts *counts)
 Gets the additional $\frac{1}{2}\sum_m\sum_t\log{(|A|)}$ term.
void ak_cmllr_init (akCMLLR *cmllr)
 Initializes the CMLLR transformation matrix.
akCMLLR * ak_cmllr_new (akCModel *cmodel, char **err)
 Get an akCMLLR.
void ak_cmllr_print_matrix (const akCMLLR *cmllr, FILE *to)
 Prints the transformation matrix.
int ak_cmllr_read_matrix (const akCMLLR *cmllr, FILE *from, char **err)
 Reads the transformation matrix.
void ak_cmllr_update_matrix (akCMLLR *cmllr, const akCMlogCounts *counts, const unsigned int niters)
 Update the transformation matrix.

Function Documentation

void ak_cmllr_adapt_fea ( akCMLLR *  cmllr,
const akFea fea_in,
akFea fea_out 
)

Adapt a feature sequence.

This function apply the CMLLR transformation matrix to the feature sequence stored in the provided feature sequence manager. The feature sequence is supposed to be real and to have the same dimension than the character models related to the CMLLR structure.

Parameters:
cmllrThe CMLLR structure.
fea_inA feature sequence manager with the real feature sequence to adapt.
fea_outThe feature sequence manager where the transformed sequence will be stored.
void ak_cmllr_free ( akCMLLR *  cmllr)

Frees memory.

Frees the memory allocated for the CMLLR structure.

Parameters:
cmllrThe CMLLR structure.
akFloat ak_cmllr_get_lv_constant ( const akCMLLR *  cmllr,
const akCMlogCounts counts 
)

Gets the additional $\frac{1}{2}\sum_m\sum_t\log{(|A|)}$ term.

This function calculates the additional term $\frac{1}{2}\sum_m\sum_t\log{(|A|)}$, which must be added to log-likelihood.

Parameters:
cmllrThe CMLLR structure.
countsLogarithmic counts related to the character models of the CMLLR structure.
Returns:
The additional term.
void ak_cmllr_init ( akCMLLR *  cmllr)

Initializes the CMLLR transformation matrix.

This function initializes the CMLLR transformation matrix. The A matrix is initialized to the identity matrix, and the b vector is initialized with zeroes.

Parameters:
cmllrThe CMLLR structure.
akCMLLR* ak_cmllr_new ( akCModel cmodel,
char **  err 
)

Get an akCMLLR.

This function creates a CMLLR structure used to adapt models and transform features using the CMLLR technique. Only DGaussian based types are supported. This function calls 'ak_cmllr_init'.

Parameters:
cmodelThe character models.
errPointer to string variable. If not NULL an error message is allocated in the variable in case of error.
Returns:
CMLLR structure or NULL in case of error.
void ak_cmllr_print_matrix ( const akCMLLR *  cmllr,
FILE *  to 
)

Prints the transformation matrix.

This functions prints the CMLLR transformation matrix in the specified file.

Parameters:
cmllrThe CMLLR structure.
toFile where the matrix is written.
int ak_cmllr_read_matrix ( const akCMLLR *  cmllr,
FILE *  from,
char **  err 
)

Reads the transformation matrix.

This functions reads the CMLLR transformation matrix from the specified file.

Parameters:
cmllrThe CMLLR structure.
fromFile where the matrix is stored.
errPointer to string variable. If not NULL an error message is allocated in the variable in case of error.
Returns:
-1 if error, 0 if success.
void ak_cmllr_update_matrix ( akCMLLR *  cmllr,
const akCMlogCounts counts,
const unsigned int  niters 
)

Update the transformation matrix.

This function recalculates the CMLLR transformation matrix, using the previous values and the provided logarithmic counts. When niters is 0 diagonal CMLLR matrix is calculated. When full matrix is calculated, counts must be created using 'ak_cmlogcounts_new_cmllr'.

Parameters:
cmllrThe CMLLR structure.
countsLogarithmic counts related to the character models of the CMLLR structure. The counts must be created using 'ak_cmlogcounts_new_cmllr' i niters>0.
nitersThe number of iterations for the CMLLR, or 0 to indicate that diagonal CMLLR matrix must be calculated. algorithm. Must be greather than 0.
 All Data Structures Variables