sfoba.h
来自「General Hidden Markov Model Library 一个通用」· C头文件 代码 · 共 105 行
H
105 行
/********************************************************************************* This file is part of the General Hidden Markov Model Library,* GHMM version 0.8_beta1, see http://ghmm.org** Filename: ghmm/ghmm/sfoba.h* Authors: Bernhard Knab, Benjamin Georgi** Copyright (C) 1998-2004 Alexander Schliep * Copyright (C) 1998-2001 ZAIK/ZPR, Universitaet zu Koeln* Copyright (C) 2002-2004 Max-Planck-Institut fuer Molekulare Genetik, * Berlin* * Contact: schliep@ghmm.org ** This library is free software; you can redistribute it and/or* modify it under the terms of the GNU Library General Public* License as published by the Free Software Foundation; either* version 2 of the License, or (at your option) any later version.** This library is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU* Library General Public License for more details.** You should have received a copy of the GNU Library General Public* License along with this library; if not, write to the Free* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*** This file is version $Revision: 1713 $ * from $Date: 2006-10-16 16:06:28 +0200 (Mon, 16 Oct 2006) $* last change by $Author: grunau $.********************************************************************************/#ifndef GHMM_SFOBA_H#define GHMM_SFOBA_H#include "smodel.h"#ifdef __cplusplusextern "C" {#endif/**@name SHMM Forward-Backward-Algorithm *//*@{ (Doc++-Group: sfoba) *//** Forward-Backward-Algorithm for multiple double 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*//** 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 T 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 ghmm_cmodel_forward (ghmm_cmodel * smo, double *O, int T, double ***b, double **alpha, double *scale, double *log_p);/** Backward-Algorithm. Calculates beta[t][i] given a double sequence and a model. Scale factors given as parameter (come from sfoba\_forward). @param smo model @param O sequence @param T length of sequence @param b matrix with precalculated output probabilities. May be NULL @param beta beta[t][i] @param scale scale factors @return 0 for success, -1 for error */ int ghmm_cmodel_backward (ghmm_cmodel * smo, double *O, int T, double ***b, 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 matrix is allocated with ighmm_cmatrix_stat_alloc @param smo model @param O sequence @param T length of sequence @param log_p log likelihood log( P(O|lambda) ) @return 0 for success, -1 for error */ int ghmm_cmodel_logp (ghmm_cmodel * smo, double *O, int T, double *log_p);#ifdef __cplusplus}#endif/*@} (Doc++-Group: sfoba) */#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?