📄 foba.h
字号:
/******************************************************************************* author : Bernd Wichern filename : ghmm/ghmm/foba.h created : TIME: 00:00:00 DATE: Tue 00. xxx 0000 $Id: foba.h,v 1.8 2004/04/07 09:43:30 cic99 Exp $Copyright (C) 1998-2001, ZAIK/ZPR, Universit鋞 zu K鰈nThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*******************************************************************************/#ifndef FOBA_H#define FOBA_H#include <ghmm/model.h>#ifdef __cplusplusextern "C" {#endif/**@name Forward-Backward-Algorithm Forward-Backward-Algorithm for multiple integer sequences with scaling. For reference see: Rabiner, L.R.: "`A Tutorial on Hidden {Markov} Models and Selected Applications in Speech Recognition"', Proceedings of the IEEE, 77, no 2, 1989, pp 257--285 *//*@{ (Doc++-Group: foba) *//** Forward-Algorithm. Calculates alpha[t][i], scaling factors scale[t] and log( P(O|lambda) ) for a given double sequence and a given model. @param smo model @param O sequence @param length: length of sequence @param alpha: alpha[t][i] @param scale: scale factors @param log\_p: log likelihood log( P(O|lambda) ) @return 0 for success, -1 for error */int foba_forward(model *mo, const int *O, int length, double **alpha, double *scale, double *log_p);/** Backward-Algorithm. Calculates beta[t][i] given an integer sequence and a model. Scale factors given as parameter (come from sfoba\_forward). @param mo model @param O sequence @param length length of sequence @param beta beta[t][i]emissionSequences @param scale scale factors @return 0 for success, -1 for error */int foba_backward(model *mo, const int *O, int length, double **beta, const double *scale);/** Calculation of log( P(O|lambda) ). Done by calling sfoba\_forward. Use this function if only the log likelihood and not alpha[t][i] is needed, alpha is allocated with stat_matrix_d_alloc @param mo model @param O sequence @param len length of sequence @param log\_p log likelihood log( P(O|lambda) ) @return 0 for success, -1 for error */int foba_logp(model *mo, const int *O, int len, double *log_p);/* Labeled HMMs */int foba_label_forward(model *mo, const int *O, const int *label, int len, double **alpha, double *scale, double *log_p);int foba_label_logp(model *mo, const int *O, const int *label, int len, double *log_p);/*@} (Doc++-Group: foba) */#ifdef __cplusplus}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -