SHOGUN v0.9.0
公有成员 | 保护成员 | 保护属性
CLinearHMM类参考

详细描述

The class LinearHMM is for learning Higher Order Markov chains.

While learning the parameters ${\bf \theta}$ in

\begin{eqnarray*} P({\bf x}|{\bf \theta}^\pm)&=&P(x_1, \ldots, x_N|{\bf \theta}^\pm)\\ &=&P(x_1,\ldots,x_{d}|{\bf \theta}^\pm)\prod_{i=d+1}^N P(x_i|x_{i-1},\ldots,x_{i-d},{\bf \theta}^\pm) \end{eqnarray*}

are determined.

A more detailed description can be found in

Durbin et.al, Biological Sequence Analysis -Probabilistic Models of Proteins and Nucleic Acids, 1998

在文件LinearHMM.h39行定义。

继承图,类CLinearHMM
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CLinearHMM ()
 CLinearHMM (CStringFeatures< uint16_t > *f)
 CLinearHMM (int32_t p_num_features, int32_t p_num_symbols)
virtual ~CLinearHMM ()
virtual bool train (CFeatures *data=NULL)
bool train (const int32_t *indizes, int32_t num_indizes, float64_t pseudo_count)
float64_t get_log_likelihood_example (uint16_t *vector, int32_t len)
float64_t get_likelihood_example (uint16_t *vector, int32_t len)
virtual float64_t get_log_likelihood_example (int32_t num_example)
virtual float64_t get_log_derivative (int32_t num_param, int32_t num_example)
virtual float64_t get_log_derivative_obsolete (uint16_t obs, int32_t pos)
virtual float64_t get_derivative_obsolete (uint16_t *vector, int32_t len, int32_t pos)
virtual int32_t get_sequence_length ()
virtual int32_t get_num_symbols ()
virtual int32_t get_num_model_parameters ()
virtual float64_t get_positional_log_parameter (uint16_t obs, int32_t position)
virtual float64_t get_log_model_parameter (int32_t num_param)
virtual void get_log_transition_probs (float64_t **dst, int32_t *num)
virtual bool set_log_transition_probs (const float64_t *src, int32_t num)
virtual void get_transition_probs (float64_t **dst, int32_t *num)
virtual bool set_transition_probs (const float64_t *src, int32_t num)
virtual const char * get_name () const

保护成员

virtual void load_serializable_post () throw (ShogunException)

保护属性

int32_t sequence_length
int32_t num_symbols
int32_t num_params
float64_ttransition_probs
float64_tlog_transition_probs

构造及析构函数文档

default constructor

在文件LinearHMM.cpp22行定义。

CLinearHMM ( CStringFeatures< uint16_t > *  f)

constructor

参数:
ffeatures to use

在文件LinearHMM.cpp27行定义。

CLinearHMM ( int32_t  p_num_features,
int32_t  p_num_symbols 
)

constructor

参数:
p_num_featuresnumber of features
p_num_symbolsnumber of symbols in features

在文件LinearHMM.cpp38行定义。

~CLinearHMM ( ) [virtual]

在文件LinearHMM.cpp48行定义。


成员函数文档

virtual float64_t get_derivative_obsolete ( uint16_t *  vector,
int32_t  len,
int32_t  pos 
) [virtual]

obsolete get one example's derivative

参数:
vectorvector
lenlength
posposition

在文件LinearHMM.h131行定义。

float64_t get_likelihood_example ( uint16_t *  vector,
int32_t  len 
)

get one example's likelihood

参数:
vectorthe example
lenlength of vector
返回:
likelihood

在文件LinearHMM.cpp213行定义。

float64_t get_log_derivative ( int32_t  num_param,
int32_t  num_example 
) [virtual]

get logarithm of one example's derivative's likelihood

参数:
num_paramwhich example's param
num_examplewhich example
返回:
logarithm of example's derivative

实现了CDistribution

在文件LinearHMM.cpp223行定义。

virtual float64_t get_log_derivative_obsolete ( uint16_t  obs,
int32_t  pos 
) [virtual]

obsolete get logarithm of one example's derivative's likelihood

参数:
obsobservation
posposition

在文件LinearHMM.h119行定义。

float64_t get_log_likelihood_example ( uint16_t *  vector,
int32_t  len 
)

get logarithm of one example's likelihood

参数:
vectorthe example
lenlength of vector
返回:
logarithm of likelihood

在文件LinearHMM.cpp186行定义。

float64_t get_log_likelihood_example ( int32_t  num_example) [virtual]

get logarithm of one example's likelihood

参数:
num_examplewhich example
返回:
logarithm of example's likelihood

实现了CDistribution

在文件LinearHMM.cpp196行定义。

virtual float64_t get_log_model_parameter ( int32_t  num_param) [virtual]

get logarithm of given model parameter

参数:
num_paramwhich param
返回:
logarithm of given model parameter

实现了CDistribution

在文件LinearHMM.h173行定义。

void get_log_transition_probs ( float64_t **  dst,
int32_t *  num 
) [virtual]

get logarithm of all transition probs

参数:
dstwhere logarithm of transition probs will be stored
numwhere number of logarithm of transition probs will be stored

在文件LinearHMM.cpp272行定义。

virtual const char* get_name ( void  ) const [virtual]
返回:
object name

实现了CSGObject

在文件LinearHMM.h215行定义。

virtual int32_t get_num_model_parameters ( ) [virtual]

get number of model parameters

返回:
number of model parameters

实现了CDistribution

在文件LinearHMM.h154行定义。

virtual int32_t get_num_symbols ( ) [virtual]

get number of symbols in examples

返回:
number of symbols in examples

在文件LinearHMM.h148行定义。

virtual float64_t get_positional_log_parameter ( uint16_t  obs,
int32_t  position 
) [virtual]

get positional log parameter

参数:
obsobservation
positionposition
返回:
positional log parameter

在文件LinearHMM.h162行定义。

virtual int32_t get_sequence_length ( ) [virtual]

get sequence length of each example

返回:
sequence length of each example

在文件LinearHMM.h142行定义。

void get_transition_probs ( float64_t **  dst,
int32_t *  num 
) [virtual]

get all transition probs

参数:
dstwhere transition probs will be stored
numwhere number of transition probs will be stored

在文件LinearHMM.cpp242行定义。

void load_serializable_post ( void  ) throw (ShogunException) [protected, virtual]

Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::LOAD_SERIALIZABLE_POST is called.

异常:
ShogunExceptionWill be thrown if an error occurres.

重载CSGObject

在文件LinearHMM.cpp302行定义。

bool set_log_transition_probs ( const float64_t src,
int32_t  num 
) [virtual]

set logarithm of all transition probs

参数:
srcnew logarithms of transition probs
numnumber of logarithms of transition probs
返回:
if setting was successful

在文件LinearHMM.cpp282行定义。

bool set_transition_probs ( const float64_t src,
int32_t  num 
) [virtual]

set all transition probs

参数:
srcnew transition probs
numnumber of transition probs
返回:
if setting was successful

在文件LinearHMM.cpp252行定义。

bool train ( CFeatures data = NULL) [virtual]

estimate LinearHMM distribution

参数:
datatraining data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data)
返回:
whether training was successful

实现了CDistribution

在文件LinearHMM.cpp54行定义。

bool train ( const int32_t *  indizes,
int32_t  num_indizes,
float64_t  pseudo_count 
)

alternative train distribution

参数:
indizesindices
num_indizesnumber of indices
pseudo_countpseudo count
返回:
if training was successful

在文件LinearHMM.cpp123行定义。


成员数据文档

logarithm of transition probs

在文件LinearHMM.h233行定义。

int32_t num_params [protected]

number of parameters

在文件LinearHMM.h229行定义。

int32_t num_symbols [protected]

number of symbols in examples

在文件LinearHMM.h227行定义。

int32_t sequence_length [protected]

examples' sequence length

在文件LinearHMM.h225行定义。

transition probs

在文件LinearHMM.h231行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation