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

gprune_beam.c File Reference

Calculate probability of a set of Gaussian densities by Gaussian pruning: beam 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_beam.c:

Go to the source code of this file.

Functions

static void clear_dimthres ()
static void set_dimthres ()
static LOGPROB compute_g_beam_updating (HTK_HMM_Dens *binfo)
 Calculate probability with threshold update.
static LOGPROB compute_g_beam_pruning (HTK_HMM_Dens *binfo)
 Calculate probability with pruning.
boolean gprune_beam_init ()
void gprune_beam (HTK_HMM_Dens **g, int gnum, int *last_id)
 Compute a set of Gaussians with beam pruning.

Variables

static LOGPROBdimthres
 Threshold for each dimension (inversed).
static int dimthres_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: beam algorithm.

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

The beam pruning is the most aggressive pruning method. This is the fastest method, but they may miss the N-best Gaussian to be found, which may result in some likelihood error.

gprune_beam() 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_beam.c.


Function Documentation

static void clear_dimthres  )  [static]
 

Clear per-dimension thresholds.

Definition at line 127 of file gprune_beam.c.

Referenced by gprune_beam().

static void set_dimthres  )  [static]
 

Set beam thresholds by adding TMBEAMWIDTH to the maximum values of each dimension.

Definition at line 139 of file gprune_beam.c.

Referenced by gprune_beam().

static LOGPROB compute_g_beam_updating HTK_HMM_Dens binfo  )  [static]
 

Calculate probability with threshold update.

Calculate probability of a Gaussian toward OP_vec, while storing the maximum values of each dimension to dimthres. 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 158 of file gprune_beam.c.

Referenced by gprune_beam().

static LOGPROB compute_g_beam_pruning HTK_HMM_Dens binfo  )  [static]
 

Calculate probability with pruning.

Calculate probability of a Gaussian toward OP_vec, performing pruning using the dimension thresholds that has been set by compute_g_beam_updating() and set_dimthres().

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

Definition at line 194 of file gprune_beam.c.

Referenced by gprune_beam().

boolean gprune_beam_init  ) 
 

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

Returns:
TRUE on success, FALSE on failure.

Definition at line 225 of file gprune_beam.c.

Referenced by outprob_init().

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

Compute a set of Gaussians with beam pruning.

If the N-best mixtures in the previous frame is specified in last_id, They are first computed to set the thresholds for each dimension. After that, the rest of the Gaussians will be computed with those dimension thresholds 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 264 of file gprune_beam.c.

Referenced by outprob_init().


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