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

gprune.h File Reference

Definitions for Gaussian pruning. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TMBEAMWIDTH   5.0
 Score beam offset for GPRUNE_SEL_BEAM.

Enumerations

enum  {
  GPRUNE_SEL_UNDEF, GPRUNE_SEL_NONE, GPRUNE_SEL_SAFE, GPRUNE_SEL_HEURISTIC,
  GPRUNE_SEL_BEAM
}
 Symbols to specify which Gaussian pruning algorithm to use. More...

Functions

int cache_push (int id, LOGPROB score, int len)
 Store a score to the current list of computed Gaussians.
LOGPROB compute_g_base (HTK_HMM_Dens *binfo)
boolean gprune_none_init ()
void gprune_none (HTK_HMM_Dens **g, int num, int *last_id)
 Compute a set of Gaussians with no pruning.
LOGPROB compute_g_safe (HTK_HMM_Dens *binfo, LOGPROB thres)
 Calculate probability with safe pruning.
boolean gprune_safe_init ()
void gprune_safe (HTK_HMM_Dens **g, int gnum, int *last_id)
 Compute a set of Gaussians with safe 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.
boolean gprune_beam_init ()
void gprune_beam (HTK_HMM_Dens **g, int gnum, int *last_id)
 Compute a set of Gaussians with beam pruning.


Detailed Description

Definitions for Gaussian pruning.

Author:
Akinobu LEE
Date:
Thu Feb 10 18:55:11 2005
This file contains definitions for Gaussian pruning, an efficient method of calculating acoustic likelihoods of a state in mixture-component HMM.

Revision
1.1.1.1

Definition in file gprune.h.


Define Documentation

#define TMBEAMWIDTH   5.0
 

Score beam offset for GPRUNE_SEL_BEAM.

Larger value may ease pruning error, but processing may become slower. Smaller value can speed up the acoustic computation, but may cause error.

Definition at line 57 of file gprune.h.

Referenced by set_dimthres().


Enumeration Type Documentation

anonymous enum
 

Symbols to specify which Gaussian pruning algorithm to use.

  • GPRUNE_SEL_UNDEF: unspecified by user
    • GPRUNE_SEL_NONE: no pruning
    • GPRUNE_SEL_SAFE: safe pruning
    • GPRUNE_SEL_HEURISTIC: heuristic pruning
    • GPRUNE_SEL_BEAM: beam pruning

Definition at line 42 of file gprune.h.


Function Documentation

int cache_push int  id,
LOGPROB  score,
int  len
 

Store a score to the current list of computed Gaussians.

Store the calculated score of a Gaussian to OP_calced_score, with its corresponding mixture id to OP_calced_id.

The OP_calced_score and OP_calced_id always holds the (OP_gprune_num)-best scores and ids. If the number of stored Gaussian from start has reached OP_gprune_num and the given score is below the bottom, it will be dropped. Else, the new score will be inserted and the bottom will be dropped from the list.

The OP_calced_score will always kept sorted by the scores.

Parameters:
id [in] mixture id of the Gaussian to store
score [in] score of the Gaussian to store
len [in] current number of stored scores in OP_calced_score
Returns:
the resulting number of stored scores in OP_calced_score.

Definition at line 87 of file gprune_common.c.

Referenced by gprune_beam(), gprune_heu(), and gprune_safe().

LOGPROB compute_g_base HTK_HMM_Dens binfo  ) 
 

Calculate probability of a Gaussian density against input vector on OP_vec.

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

Definition at line 58 of file gprune_none.c.

Referenced by compute_gs_scores(), gprune_beam(), gprune_heu(), gprune_none(), and gprune_safe().

boolean gprune_none_init  ) 
 

Initialize and setup work area for Gaussian computation

Returns:
TRUE on success, FALSE on failure.

Definition at line 84 of file gprune_none.c.

Referenced by outprob_init().

void gprune_none HTK_HMM_Dens **  g,
int  num,
int *  last_id
 

Compute a set of Gaussians with no pruning.

The calculated scores will be stored to OP_calced_score, with its corresponding mixture id to OP_calced_id. 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.
num [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 110 of file gprune_none.c.

Referenced by outprob_init().

LOGPROB compute_g_safe HTK_HMM_Dens binfo,
LOGPROB  thres
 

Calculate probability with safe pruning.

Calculate probability of a Gaussian toward OP_vec, performing pruning using the scholar threshold.

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

Definition at line 77 of file gprune_safe.c.

Referenced by gprune_beam(), gprune_heu(), and gprune_safe().

boolean gprune_safe_init  ) 
 

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

Returns:
TRUE on success, FALSE on failure.

Definition at line 106 of file gprune_safe.c.

Referenced by outprob_init().

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

Compute a set of Gaussians with safe pruning.

If the N-best mixtures in the previous frame is specified in last_id, They are first computed to set the initial threshold. After that, the rest of the Gaussians will be computed with the thresholds to drop unpromising Gaussians from computation at early stage of likelihood computation. If the computation of a Gaussian reached to the end, the threshold will be updated to always hold the likelihood of current N-best score.

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 142 of file gprune_safe.c.

Referenced by outprob_init().

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().

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:02:11 2006 for Julius by  doxygen 1.4.2