Julius 4.2
関数
libsent/src/phmm/gprune_heu.c

混合ガウス分布計算: Gaussian pruning (heuristic algorithm) [詳細]

#include <sent/stddefs.h>
#include <sent/htk_hmm.h>
#include <sent/htk_param.h>
#include <sent/hmm.h>
#include <sent/hmm_calc.h>

ソースコードを見る。

関数

static void init_backmax (HMMWork *wrk)
 Clear backmax information.
static void make_backmax (HMMWork *wrk)
 Build backmax information for each frame, by summing up current maximum values of each dimensions.
static LOGPROB compute_g_heu_updating (HMMWork *wrk, HTK_HMM_Dens *binfo)
 Calculate probability with maximum value update.
static LOGPROB compute_g_heu_pruning (HMMWork *wrk, HTK_HMM_Dens *binfo, LOGPROB thres)
 Calculate probability with pruning.
boolean gprune_heu_init (HMMWork *wrk)
 Initialize and setup work area for Gaussian pruning by heuristic algorithm.
void gprune_heu_free (HMMWork *wrk)
 Free gprune_heu related work area.
void gprune_heu (HMMWork *wrk, HTK_HMM_Dens **g, int gnum, int *last_id, int lnum)
 Compute a set of Gaussians with heuristic pruning.

説明

混合ガウス分布計算: Gaussian pruning (heuristic algorithm)

gprune_heu()は混合ガウス分布集合の計算ルーチンの一つです. heuristic pruning を使って上位のガウス分布の出力確率のみを高速に求めます. Tied-mixture HMM 使用時に Julius でGPRUNE_DEFAULT_HEURISTIC が 定義されているか,あるいはJuliusのオプション "-gprune heuristic" を 指定することでこの関数が使用されます.

heuristic pruning はあまり使われていない手法で,高速化の効果は 他の手法の中間です.

gprune_heu()outprob_init() によってその関数へのポインタが compute_gaussset にセットされることで使用されます.このポインタが calc_tied_mix() または calc_mix() から呼び出されます.

作者:
Akinobu LEE
日付:
Thu Feb 17 05:44:52 2005
Revision:
1.5

gprune_heu.c で定義されています。


関数

static void init_backmax ( HMMWork wrk) [static]

Clear backmax information.

引数:
wrk[i/o] HMM computation work area

gprune_heu.c112 行で定義されています。

参照元 gprune_heu().

static void make_backmax ( HMMWork wrk) [static]

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

引数:
wrk[i/o] HMM computation work area

gprune_heu.c133 行で定義されています。

参照元 gprune_heu().

static LOGPROB compute_g_heu_updating ( HMMWork wrk,
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.

引数:
wrk[i/o] HMM computation work area
binfo[in] Gaussian density
戻り値:
the output log probability.

gprune_heu.c161 行で定義されています。

参照元 gprune_heu().

static LOGPROB compute_g_heu_pruning ( HMMWork wrk,
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().

引数:
wrk[i/o] HMM computation work area
binfo[in] Gaussian density
thres[in] threshold
戻り値:
the output log probability.

gprune_heu.c200 行で定義されています。

参照元 gprune_heu().

boolean gprune_heu_init ( HMMWork wrk)

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

引数:
wrk[i/o] HMM computation work area
戻り値:
TRUE on success, FALSE on failure.

gprune_heu.c237 行で定義されています。

参照元 outprob_init().

void gprune_heu_free ( HMMWork wrk)

Free gprune_heu related work area.

引数:
wrk[i/o] HMM computation work area

gprune_heu.c260 行で定義されています。

参照元 outprob_init().

void gprune_heu ( HMMWork wrk,
HTK_HMM_Dens **  g,
int  gnum,
int *  last_id,
int  lnum 
)

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

引数:
wrk[i/o] HMM computation work area
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
lnum[in] length of last_id

gprune_heu.c295 行で定義されています。

参照元 outprob_init().