📄 smap_classify.h
字号:
/******************************************************************************* author : Bernd Wichern filename : ghmm/ghmm/smap_classify.h created : TIME: 13:40:31 DATE: Wed 12. January 2000 $Id: smap_classify.h,v 1.4 2001/07/20 13:29:05 disa 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 SMAP_CLASSIFY_H#define SMAP_CLASSIFY_H#include <ghmm/smodel.h>#ifdef __cplusplusextern "C" {#endif/**@name smap functions *//*@{ *//** Maximum A Posteriori Classification Algorithm (MAPCA): given a field of models and one sequence and suppose the sequence has been produced by one of these models. This algorithm calculates for each model the probability, that the seq. comes from the model. This bayesian approach uses a prior for the models. If none is specified equal prob. is assumed. The maps are copied into "result", which has to be of dimension "smo_number" Ref.: A. Kehagias: Bayesian Classification of HMM, Math. Comp. Modelling (1995) @return number of the model, that fits best to the sequence @param smo vector of models @param result gives the probability for all the models @param smo_number number of models @param O sequence @param T length of the sequence */int smap_classify(smodel **smo, double *result, int smo_number, double *O, int T);/** Alternative to MAPCA (smap_classify); calculate p[m] directly using Bayes' theorem, instead of recursive over t. p(m | O) = p(O | m) * p(m) / (sum_i p(O | i) * p(i)) @return number of the model, that fits best to the sequence @param smo vector of models @param result gives the probability for all the models @param smo_number number of models @param O sequence @param T length of the sequence */int smap_bayes(smodel **smo, double *result, int smo_number, double *O, int T);#ifdef __cplusplus}#endif/*@} */#endif /* SMAP_CLASSIFY_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -