Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

gprune_heu.c File Reference

Calculate probability of a set of Gaussian densities by Gaussian pruning: heuristic algorithm. More...

#include <sent/stddefs.h>
#include <sent/htk_hmm.h>
#include <sent/htk_param.h>
#include <sent/hmm.h>
#include <sent/gprune.h>
#include "globalvars.h"

Include dependency graph for gprune_heu.c:

Go to the source code of this file.

Functions

static void init_backmax ()
static void make_backmax ()
static LOGPROB compute_g_heu_updating (HTK_HMM_Dens *binfo)
 Calculate probability with maximum value update.
static LOGPROB compute_g_heu_pruning (HTK_HMM_Dens *binfo, LOGPROB thres)
 Calculate probability with pruning.
boolean gprune_heu_init ()
void gprune_heu (HTK_HMM_Dens **g, int gnum, int *last_id)
 Compute a set of Gaussians with heuristic pruning.

Variables

static LOGPROBbackmax
 Backward sum of max for each dimension (inversed).
static int backmax_num
 Length of above.
static booleanmixcalced
 Mark which Gaussian has been computed.


Detailed Description

Calculate probability of a set of Gaussian densities by Gaussian pruning: heuristic algorithm.

Author:
Akinobu LEE
Date:
Thu Feb 17 05:44:52 2005
gprune_heu() is one of the functions to compute output probability of a set of Gaussian densities. This function does heuristic pruning, trying to compute only the best ones for faster computation. If a tied-mixture HMM model with GPRUNE_DEFAULT_HEURISTIC defined in Julius, or explicitly specified by "-gprune heuristic" option, this function will be used.

The effect of heuristic pruning is practically a middle of others.

gprune_heu() will be used by calling outprob_init() to set its pointer to the global variable compute_gaussset. Then it will be called from calc_tied_mix() or calc_mix().

Revision
1.1.1.1

Definition in file gprune_heu.c.


Function Documentation

static void init_backmax  )  [static]
 

Clear backmax information.

Definition at line 116 of file gprune_heu.c.

Referenced by gprune_heu().

static void make_backmax  )  [static]
 

Build backmax information for each frame, by summing up current maximum values of each dimensions.

Definition at line 136 of file gprune_heu.c.

Referenced by gprune_heu().

static LOGPROB compute_g_heu_updating HTK_HMM_Dens binfo  )  [static]
 

Calculate probability with maximum value update.

Calculate probability of a Gaussian toward OP_vec, while storing the maximum values of each dimension to backmax. for future pruning. The pruning itself is not performed here. This function will be used to compute the first N Gaussians.

Parameters:
binfo [in] Gaussian density
Returns:
the output log probability.

Definition at line 162 of file gprune_heu.c.

Referenced by gprune_heu().

static LOGPROB compute_g_heu_pruning HTK_HMM_Dens binfo,
LOGPROB  thres
[static]
 

Calculate probability with pruning.

Calculate probability of a Gaussian toward OP_vec, performing pruning using threshold and the backmax information that has been set by compute_g_heu_updating() and make_backmax().

Parameters:
binfo [in] Gaussian density
thres [in] threshold
Returns:
the output log probability.

Definition at line 200 of file gprune_heu.c.

Referenced by gprune_heu().

boolean gprune_heu_init  ) 
 

Initialize and setup work area for Gaussian pruning by heuristic algorithm.

Returns:
TRUE on success, FALSE on failure.

Definition at line 235 of file gprune_heu.c.

Referenced by outprob_init().

void gprune_heu HTK_HMM_Dens **  g,
int  gnum,
int *  last_id
 

Compute a set of Gaussians with heuristic pruning.

If the N-best mixtures in the previous frame is specified in last_id, They are first computed to get the maximum value for each dimension. After that, the rest of the Gaussians will be computed using the maximum values as heuristics of uncomputed dimensions to drop unpromising Gaussians from computation at early stage of likelihood computation. If the last_id is not specified (typically at the first frame of the input), a safe pruning as same as one in gprune_safe.c will be applied.

The calculated scores will be stored to OP_calced_score, with its corresponding mixture id to OP_calced_id. These are done by calling cache_push(). The number of calculated mixtures is also stored in OP_calced_num.

This can be called from calc_tied_mix() or calc_mix().

Parameters:
g [in] set of Gaussian densities to compute the output probability
gnum [in] length of above
last_id [in] ID list of N-best mixture in previous input frame, or NULL if not exist

Definition at line 275 of file gprune_heu.c.

Referenced by outprob_init().


Generated on Tue Mar 28 16:03:26 2006 for Julius by  doxygen 1.4.2