libak
0.4.0
|
Functions | |
void | ak_vtrainer_free (akVTrainer *vtrainer) |
Frees memory. | |
akVTrainer * | ak_vtrainer_new (const akCModel *cmodel, akCMiCounts *counts, const akSeqs *seqs, char **err) |
Gets an akVTrainer. | |
akProb | ak_vtrain (akVTrainer *vtrainer, const akFea *fea, const size_t seq) |
Updates character model counts according to the Viterbi algorithm. |
Updates character model counts according to the Viterbi algorithm.
This function increase the character model counts, which are stored in the trainer, from one sample (feature vector sequence) and its transcription, using the Viterbi algorithm in order to obtain the integer counts. The sequence is specified as an integer code according to the sequence manager used during the creation of the viterbi trainer.
vtrainer | The viterbi trainer. |
fea | A feature vector manager, which must contain a sequence of feature vectors of an adequate type for the cmodel. |
seq | The code of the transcription of the sample. |
void ak_vtrainer_free | ( | akVTrainer * | vtrainer | ) |
Frees memory.
Frees the memory allocated for the auxiliary data.
vtrainer | The Viterbi trainer. |
akVTrainer* ak_vtrainer_new | ( | const akCModel * | cmodel, |
akCMiCounts * | counts, | ||
const akSeqs * | seqs, | ||
char ** | err | ||
) |
Gets an akVTrainer.
This function creates auxiliary data used to train character models from transcriptions using the Viterbi algorithm. This data only can be used to train the character sequences stored in seqs during the creation of the trainer. Currently supported types are: Bernoulli, DGaussian and Mixture.
cmodel | The character models. |
counts | The integer counts which will be increased. |
seqs | A character sequence manager containing the character sequences which can be used to train samples. |
err | Pointer to string variable. If not NULL an error message is allocated in the variable in case of error. |