SHOGUN  4.1.0
所有成员列表 | Public 成员函数 | 静态 Public 成员函数 | Public 属性 | Protected 成员函数 | Protected 属性 | 静态 Protected 属性
CHMM类 参考

详细描述

Hidden Markov Model.

Structure and Function collection. This Class implements a Hidden Markov Model. For a tutorial on HMMs see Rabiner et.al A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition, 1989

Several functions for tasks such as training,reading/writing models, reading observations, calculation of derivatives are supplied.

在文件 HMM.h 第 369 行定义.

类 CHMM 继承关系图:
Inheritance graph
[图例]

Public 成员函数

 CHMM ()
 
bool alloc_state_dependend_arrays ()
 allocates memory that depends on N 更多...
 
void free_state_dependend_arrays ()
 free memory that depends on N 更多...
 
bool linear_train (bool right_align=false)
 estimates linear model from observations. 更多...
 
bool permutation_entropy (int32_t window_width, int32_t sequence_number)
 compute permutation entropy 更多...
 
virtual const char * get_name () const
 
virtual int32_t get_num_relevant_model_parameters ()
 
virtual float64_t get_log_likelihood_sample ()
 
virtual SGVector< float64_t > get_log_likelihood ()
 
virtual float64_t get_model_parameter (int32_t num_param)
 
virtual float64_t get_derivative (int32_t num_param, int32_t num_example)
 
virtual float64_t get_likelihood_example (int32_t num_example)
 
virtual SGVector< float64_t > get_likelihood_for_all_examples ()
 
virtual void set_features (CFeatures *f)
 
virtual CFeatures * get_features ()
 
virtual void set_pseudo_count (float64_t pseudo)
 
virtual float64_t get_pseudo_count ()
 
virtual float64_t update_params_em (float64_t *alpha_k, int32_t len)
 
virtual CSGObject * shallow_copy () const
 
virtual CSGObject * deep_copy () const
 
virtual bool is_generic (EPrimitiveType *generic) const
 
template<class T >
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
void unset_generic ()
 
virtual void print_serializable (const char *prefix="")
 
virtual bool save_serializable (CSerializableFile *file, const char *prefix="")
 
virtual bool load_serializable (CSerializableFile *file, const char *prefix="")
 
void set_global_io (SGIO *io)
 
SGIO * get_global_io ()
 
void set_global_parallel (Parallel *parallel)
 
Parallel * get_global_parallel ()
 
void set_global_version (Version *version)
 
Version * get_global_version ()
 
SGStringList< char > get_modelsel_names ()
 
void print_modsel_params ()
 
char * get_modsel_param_descr (const char *param_name)
 
index_t get_modsel_param_index (const char *param_name)
 
void build_gradient_parameter_dictionary (CMap< TParameter *, CSGObject * > *dict)
 
virtual void update_parameter_hash ()
 
virtual bool parameter_hash_changed ()
 
virtual bool equals (CSGObject *other, float64_t accuracy=0.0, bool tolerant=false)
 
virtual CSGObject * clone ()
 
Constructor/Destructor and helper function
 CHMM (int32_t N, int32_t M, Model *model, float64_t PSEUDO)
 
 CHMM (CStringFeatures< uint16_t > *obs, int32_t N, int32_t M, float64_t PSEUDO)
 
 CHMM (int32_t N, float64_t *p, float64_t *q, float64_t *a)
 
 CHMM (int32_t N, float64_t *p, float64_t *q, int32_t num_trans, float64_t *a_trans)
 
 CHMM (FILE *model_file, float64_t PSEUDO)
 
 CHMM (CHMM *h)
 Constructor - Clone model h. 更多...
 
virtual ~CHMM ()
 Destructor - Cleanup. 更多...
 
virtual bool train (CFeatures *data=NULL)
 
virtual int32_t get_num_model_parameters ()
 
virtual float64_t get_log_model_parameter (int32_t num_param)
 
virtual float64_t get_log_derivative (int32_t num_param, int32_t num_example)
 
virtual float64_t get_log_likelihood_example (int32_t num_example)
 
bool initialize_hmm (Model *model, float64_t PSEUDO, FILE *model_file=NULL)
 
probability functions.

forward/backward/viterbi algorithm

float64_t forward_comp (int32_t time, int32_t state, int32_t dimension)
 
float64_t forward_comp_old (int32_t time, int32_t state, int32_t dimension)
 
float64_t backward_comp (int32_t time, int32_t state, int32_t dimension)
 
float64_t backward_comp_old (int32_t time, int32_t state, int32_t dimension)
 
float64_t best_path (int32_t dimension)
 
uint16_t get_best_path_state (int32_t dim, int32_t t)
 
float64_t model_probability_comp ()
 
float64_t model_probability (int32_t dimension=-1)
 inline proxy for model probability. 更多...
 
float64_t linear_model_probability (int32_t dimension)
 
convergence criteria
bool set_iterations (int32_t num)
 
int32_t get_iterations ()
 
bool set_epsilon (float64_t eps)
 
float64_t get_epsilon ()
 
bool baum_welch_viterbi_train (BaumWelchViterbiType type)
 
model training
void estimate_model_baum_welch (CHMM *train)
 
void estimate_model_baum_welch_trans (CHMM *train)
 
void estimate_model_baum_welch_old (CHMM *train)
 
void estimate_model_baum_welch_defined (CHMM *train)
 
void estimate_model_viterbi (CHMM *train)
 
void estimate_model_viterbi_defined (CHMM *train)
 
output functions.
void output_model (bool verbose=false)
 
void output_model_defined (bool verbose=false)
 performs output_model only for the defined transitions etc 更多...
 
model helper functions.
void normalize (bool keep_dead_states=false)
 normalize the model to satisfy stochasticity 更多...
 
void add_states (int32_t num_states, float64_t default_val=0)
 
bool append_model (CHMM *append_model, float64_t *cur_out, float64_t *app_out)
 
bool append_model (CHMM *append_model)
 
void chop (float64_t value)
 set any model parameter with probability smaller than value to ZERO 更多...
 
void convert_to_log ()
 convert model to log probabilities 更多...
 
void init_model_random ()
 init model with random values 更多...
 
void init_model_defined ()
 
void clear_model ()
 initializes model with log(PSEUDO) 更多...
 
void clear_model_defined ()
 initializes only parameters in learn_x with log(PSEUDO) 更多...
 
void copy_model (CHMM *l)
 copies the the modelparameters from l 更多...
 
void invalidate_model ()
 
bool get_status () const
 
float64_t get_pseudo () const
 returns current pseudo value 更多...
 
void set_pseudo (float64_t pseudo)
 sets current pseudo value 更多...
 
void set_observations (CStringFeatures< uint16_t > *obs, CHMM *hmm=NULL)
 
void set_observation_nocache (CStringFeatures< uint16_t > *obs)
 
CStringFeatures< uint16_t > * get_observations ()
 return observation pointer 更多...
 
load/save functions.

for observations/model/traindefinitions

bool load_definitions (FILE *file, bool verbose, bool initialize=true)
 
bool load_model (FILE *file)
 
bool save_model (FILE *file)
 
bool save_model_derivatives (FILE *file)
 
bool save_model_derivatives_bin (FILE *file)
 
bool save_model_bin (FILE *file)
 
bool check_model_derivatives ()
 numerically check whether derivates were calculated right 更多...
 
bool check_model_derivatives_combined ()
 
T_STATES * get_path (int32_t dim, float64_t &prob)
 
bool save_path (FILE *file)
 
bool save_path_derivatives (FILE *file)
 
bool save_path_derivatives_bin (FILE *file)
 
bool save_likelihood_bin (FILE *file)
 
bool save_likelihood (FILE *file)
 
access functions for model parameters

for all the arrays a,b,p,q,A,B,psi and scalar model parameters like N,M

T_STATES get_N () const
 access function for number of states N 更多...
 
int32_t get_M () const
 access function for number of observations M 更多...
 
void set_q (T_STATES offset, float64_t value)
 
void set_p (T_STATES offset, float64_t value)
 
void set_A (T_STATES line_, T_STATES column, float64_t value)
 
void set_a (T_STATES line_, T_STATES column, float64_t value)
 
void set_B (T_STATES line_, uint16_t column, float64_t value)
 
void set_b (T_STATES line_, uint16_t column, float64_t value)
 
void set_psi (int32_t time, T_STATES state, T_STATES value, int32_t dimension)
 
float64_t get_q (T_STATES offset) const
 
float64_t get_p (T_STATES offset) const
 
float64_t get_A (T_STATES line_, T_STATES column) const
 
float64_t get_a (T_STATES line_, T_STATES column) const
 
float64_t get_B (T_STATES line_, uint16_t column) const
 
float64_t get_b (T_STATES line_, uint16_t column) const
 
T_STATES get_psi (int32_t time, T_STATES state, int32_t dimension) const
 
functions for observations

management and access functions for observation matrix

float64_t state_probability (int32_t time, int32_t state, int32_t dimension)
 calculates probability of being in state i at time t for dimension 更多...
 
float64_t transition_probability (int32_t time, int32_t state_i, int32_t state_j, int32_t dimension)
 calculates probability of being in state i at time t and state j at time t+1 for dimension 更多...
 
derivatives of model probabilities.

computes log dp(lambda)/d lambda_i

参数
dimensiondimension for that derivatives are calculated
i,jparameter specific
float64_t linear_model_derivative (T_STATES i, uint16_t j, int32_t dimension)
 
float64_t model_derivative_p (T_STATES i, int32_t dimension)
 
float64_t model_derivative_q (T_STATES i, int32_t dimension)
 
float64_t model_derivative_a (T_STATES i, T_STATES j, int32_t dimension)
 computes log dp(lambda)/d a_ij. 更多...
 
float64_t model_derivative_b (T_STATES i, uint16_t j, int32_t dimension)
 computes log dp(lambda)/d b_ij. 更多...
 
derivatives of path probabilities.

computes d log p(lambda,best_path)/d lambda_i

参数
dimensiondimension for that derivatives are calculated
i,jparameter specific
float64_t path_derivative_p (T_STATES i, int32_t dimension)
 computes d log p(lambda,best_path)/d p_i 更多...
 
float64_t path_derivative_q (T_STATES i, int32_t dimension)
 computes d log p(lambda,best_path)/d q_i 更多...
 
float64_t path_derivative_a (T_STATES i, T_STATES j, int32_t dimension)
 computes d log p(lambda,best_path)/d a_ij 更多...
 
float64_t path_derivative_b (T_STATES i, uint16_t j, int32_t dimension)
 computes d log p(lambda,best_path)/d b_ij 更多...
 

静态 Public 成员函数

static CDistribution * obtain_from_generic (CSGObject *object)
 

Public 属性

SGIO * io
 
Parallel * parallel
 
Version * version
 
Parameter * m_parameters
 
Parameter * m_model_selection_parameters
 
Parameter * m_gradient_parameters
 
uint32_t m_hash
 

Protected 成员函数

void prepare_path_derivative (int32_t dim)
 initialization function that is called before path_derivatives are calculated 更多...
 
float64_t forward (int32_t time, int32_t state, int32_t dimension)
 inline proxies for forward pass 更多...
 
float64_t backward (int32_t time, int32_t state, int32_t dimension)
 inline proxies for backward pass 更多...
 
virtual void load_serializable_pre () throw (ShogunException)
 
virtual void load_serializable_post () throw (ShogunException)
 
virtual void save_serializable_pre () throw (ShogunException)
 
virtual void save_serializable_post () throw (ShogunException)
 
input helper functions.

for reading model/definition/observation files

bool get_numbuffer (FILE *file, char *buffer, int32_t length)
 put a sequence of numbers into the buffer 更多...
 
void open_bracket (FILE *file)
 expect open bracket. 更多...
 
void close_bracket (FILE *file)
 expect closing bracket 更多...
 
bool comma_or_space (FILE *file)
 expect comma or space. 更多...
 
void error (int32_t p_line, const char *str)
 parse error messages 更多...
 

Protected 属性

float64_t * arrayN1
 
float64_t * arrayN2
 
T_ALPHA_BETA alpha_cache
 cache for forward variables can be terrible HUGE O(T*N) 更多...
 
T_ALPHA_BETA beta_cache
 cache for backward variables can be terrible HUGE O(T*N) 更多...
 
T_STATES * states_per_observation_psi
 backtracking table for viterbi can be terrible HUGE O(T*N) 更多...
 
T_STATES * path
 best path (=state sequence) through model 更多...
 
bool path_prob_updated
 true if path probability is up to date 更多...
 
int32_t path_prob_dimension
 dimension for which path_prob was calculated 更多...
 
CFeatures * features
 
float64_t pseudo_count
 
model specific variables.

these are p,q,a,b,N,M etc

int32_t M
 number of observation symbols eg. ACGT -> 0123 更多...
 
int32_t N
 number of states 更多...
 
float64_t PSEUDO
 define pseudocounts against overfitting 更多...
 
int32_t line
 
CStringFeatures< uint16_t > * p_observations
 observation matrix 更多...
 
Model * model
 
float64_t * transition_matrix_A
 matrix of absolute counts of transitions 更多...
 
float64_t * observation_matrix_B
 matrix of absolute counts of observations within each state 更多...
 
float64_t * transition_matrix_a
 transition matrix 更多...
 
float64_t * initial_state_distribution_p
 initial distribution of states 更多...
 
float64_t * end_state_distribution_q
 distribution of end-states 更多...
 
float64_t * observation_matrix_b
 distribution of observations within each state 更多...
 
int32_t iterations
 convergence criterion iterations 更多...
 
int32_t iteration_count
 
float64_t epsilon
 convergence criterion epsilon 更多...
 
int32_t conv_it
 
float64_t all_pat_prob
 probability of best path 更多...
 
float64_t pat_prob
 probability of best path 更多...
 
float64_t mod_prob
 probability of model 更多...
 
bool mod_prob_updated
 true if model probability is up to date 更多...
 
bool all_path_prob_updated
 true if path probability is up to date 更多...
 
int32_t path_deriv_dimension
 dimension for which path_deriv was calculated 更多...
 
bool path_deriv_updated
 true if path derivative is up to date 更多...
 
bool loglikelihood
 
bool status
 
bool reused_caches
 

静态 Protected 属性

static const int32_t GOTN = (1<<1)
 
static const int32_t GOTM = (1<<2)
 
static const int32_t GOTO = (1<<3)
 
static const int32_t GOTa = (1<<4)
 
static const int32_t GOTb = (1<<5)
 
static const int32_t GOTp = (1<<6)
 
static const int32_t GOTq = (1<<7)
 
static const int32_t GOTlearn_a = (1<<1)
 
static const int32_t GOTlearn_b = (1<<2)
 
static const int32_t GOTlearn_p = (1<<3)
 
static const int32_t GOTlearn_q = (1<<4)
 
static const int32_t GOTconst_a = (1<<5)
 
static const int32_t GOTconst_b = (1<<6)
 
static const int32_t GOTconst_p = (1<<7)
 
static const int32_t GOTconst_q = (1<<8)
 

构造及析构函数说明

CHMM ( )

Train definitions. Encapsulates Modelparameters that are constant/shall be learned. Consists of structures and access functions for learning only defined transitions and constants.default constructor

在文件 HMM.cpp 第 143 行定义.

CHMM ( int32_t  N,
int32_t  M,
Model *  model,
float64_t  PSEUDO 
)

Constructor

参数
Nnumber of states
Mnumber of emissions
modelmodel which holds definitions of states to be learned + consts
PSEUDOPseudo Value

在文件 HMM.cpp 第 198 行定义.

CHMM ( CStringFeatures< uint16_t > *  obs,
int32_t  N,
int32_t  M,
float64_t  PSEUDO 
)

在文件 HMM.cpp 第 212 行定义.

CHMM ( int32_t  N,
float64_t *  p,
float64_t *  q,
float64_t *  a 
)

在文件 HMM.cpp 第 229 行定义.

CHMM ( int32_t  N,
float64_t *  p,
float64_t *  q,
int32_t  num_trans,
float64_t *  a_trans 
)

在文件 HMM.cpp 第 279 行定义.

CHMM ( FILE *  model_file,
float64_t  PSEUDO 
)

Constructor - Initialization from model file.

参数
model_fileFilehandle to a hmm model file (*.mod)
PSEUDOPseudo Value

在文件 HMM.cpp 第 389 行定义.

CHMM ( CHMM *  h)

Constructor - Clone model h.

在文件 HMM.cpp 第 184 行定义.

~CHMM ( )
virtual

Destructor - Cleanup.

在文件 HMM.cpp 第 399 行定义.

成员函数说明

void add_states ( int32_t  num_states,
float64_t  default_val = 0 
)

increases the number of states by num_states the new a/b/p/q values are given the value default_val where 0<=default_val<=1

在文件 HMM.cpp 第 5063 行定义.

bool alloc_state_dependend_arrays ( )

allocates memory that depends on N

在文件 HMM.cpp 第 503 行定义.

bool append_model ( CHMM *  append_model,
float64_t *  cur_out,
float64_t *  app_out 
)

appends the append_model to the current hmm, i.e. two extra states are created. one is the end state of the current hmm with outputs cur_out (of size M) and the other state is the start state of the append_model. transition probability from state 1 to states 1 is 1

在文件 HMM.cpp 第 4955 行定义.

bool append_model ( CHMM *  append_model)

appends the append_model to the current hmm, here no extra states are created. former q_i are multiplied by q_ji to give the a_ij from the current hmm to the append_model

在文件 HMM.cpp 第 4863 行定义.

float64_t backward ( int32_t  time,
int32_t  state,
int32_t  dimension 
)
protected

inline proxies for backward pass

在文件 HMM.h 第 1560 行定义.

float64_t backward_comp ( int32_t  time,
int32_t  state,
int32_t  dimension 
)

backward algorithm. calculates Pr[O_t+1,O_t+2, ..., O_T-1| q_time=S_i, lambda] for 0<= time <= T-1 Pr[O|lambda] for time >= T

参数
timet
statei
dimensiondimension of observation (observations are a matrix, where a row stands for one dimension i.e. 0_0,O_1,...,O_{T-1}

在文件 HMM.cpp 第 923 行定义.

float64_t backward_comp_old ( int32_t  time,
int32_t  state,
int32_t  dimension 
)

在文件 HMM.cpp 第 1022 行定义.

bool baum_welch_viterbi_train ( BaumWelchViterbiType  type)

interface for e.g. GUIHMM to run BaumWelch or Viterbi training

参数
typetype of BaumWelch/Viterbi training

在文件 HMM.cpp 第 5580 行定义.

float64_t best_path ( int32_t  dimension)

calculates probability of best state sequence s_0,...,s_T-1 AND path itself using viterbi algorithm. The path can be found in the array PATH(dimension)[0..T-1] afterwards

参数
dimensiondimension of observation for which the most probable path is calculated (observations are a matrix, where a row stands for one dimension i.e. 0_0,O_1,...,O_{T-1}

在文件 HMM.cpp 第 1154 行定义.

void build_gradient_parameter_dictionary ( CMap< TParameter *, CSGObject * > *  dict)
inherited

Builds a dictionary of all parameters in SGObject as well of those of SGObjects that are parameters of this object. Dictionary maps parameters to the objects that own them.

参数
dictdictionary of parameters to be built.

在文件 SGObject.cpp 第 597 行定义.

bool check_model_derivatives ( )

numerically check whether derivates were calculated right

在文件 HMM.cpp 第 4620 行定义.

bool check_model_derivatives_combined ( )

在文件 HMM.cpp 第 4550 行定义.

void chop ( float64_t  value)

set any model parameter with probability smaller than value to ZERO

在文件 HMM.cpp 第 5123 行定义.

void clear_model ( )

initializes model with log(PSEUDO)

在文件 HMM.cpp 第 2662 行定义.

void clear_model_defined ( )

initializes only parameters in learn_x with log(PSEUDO)

在文件 HMM.cpp 第 2678 行定义.

CSGObject * clone ( )
virtualinherited

Creates a clone of the current object. This is done via recursively traversing all parameters, which corresponds to a deep copy. Calling equals on the cloned object always returns true although none of the memory of both objects overlaps.

返回
an identical copy of the given object, which is disjoint in memory. NULL if the clone fails. Note that the returned object is SG_REF'ed

在文件 SGObject.cpp 第 714 行定义.

void close_bracket ( FILE *  file)
protected

expect closing bracket

在文件 HMM.cpp 第 2825 行定义.

bool comma_or_space ( FILE *  file)
protected

expect comma or space.

在文件 HMM.cpp 第 2838 行定义.

void convert_to_log ( )

convert model to log probabilities

在文件 HMM.cpp 第 2395 行定义.

void copy_model ( CHMM *  l)

copies the the modelparameters from l

在文件 HMM.cpp 第 2701 行定义.

CSGObject * deep_copy ( ) const
virtualinherited

A deep copy. All the instance variables will also be copied.

在文件 SGObject.cpp 第 198 行定义.

bool equals ( CSGObject *  other,
float64_t  accuracy = 0.0,
bool  tolerant = false 
)
virtualinherited

Recursively compares the current SGObject to another one. Compares all registered numerical parameters, recursion upon complex (SGObject) parameters. Does not compare pointers!

May be overwritten but please do with care! Should not be necessary in most cases.

参数
otherobject to compare with
accuracyaccuracy to use for comparison (optional)
tolerantallows linient check on float equality (within accuracy)
返回
true if all parameters were equal, false if not

在文件 SGObject.cpp 第 618 行定义.

void error ( int32_t  p_line,
const char *  str 
)
protected

parse error messages

在文件 HMM.h 第 1505 行定义.

void estimate_model_baum_welch ( CHMM *  train)

uses baum-welch-algorithm to train a fully connected HMM.

参数
trainmodel from which the new model is estimated

在文件 HMM.cpp 第 1530 行定义.

void estimate_model_baum_welch_defined ( CHMM *  train)

uses baum-welch-algorithm to train the defined transitions etc.

参数
trainmodel from which the new model is estimated

在文件 HMM.cpp 第 1771 行定义.

void estimate_model_baum_welch_old ( CHMM *  train)

在文件 HMM.cpp 第 1616 行定义.

void estimate_model_baum_welch_trans ( CHMM *  train)

在文件 HMM.cpp 第 1701 行定义.

void estimate_model_viterbi ( CHMM *  train)

uses viterbi training to train a fully connected HMM

参数
trainmodel from which the new model is estimated

在文件 HMM.cpp 第 1947 行定义.

void estimate_model_viterbi_defined ( CHMM *  train)

uses viterbi training to train the defined transitions etc.

参数
trainmodel from which the new model is estimated

在文件 HMM.cpp 第 2074 行定义.

float64_t forward ( int32_t  time,
int32_t  state,
int32_t  dimension 
)
protected

inline proxies for forward pass

在文件 HMM.h 第 1543 行定义.

float64_t forward_comp ( int32_t  time,
int32_t  state,
int32_t  dimension 
)

forward algorithm. calculates Pr[O_0,O_1, ..., O_t, q_time=S_i| lambda] for 0<= time <= T-1 Pr[O|lambda] for time > T

参数
timet
statei
dimensiondimension of observation (observations are a matrix, where a row stands for one dimension i.e. 0_0,O_1,...,O_{T-1}

在文件 HMM.cpp 第 687 行定义.

float64_t forward_comp_old ( int32_t  time,
int32_t  state,
int32_t  dimension 
)

在文件 HMM.cpp 第 791 行定义.

void free_state_dependend_arrays ( )

free memory that depends on N

在文件 HMM.cpp 第 560 行定义.

float64_t get_A ( T_STATES  line_,
T_STATES  column 
) const

access function for matrix A

参数
line_row in matrix 0...N-1
columncolumn in matrix 0...N-1
返回
value at position line colum

在文件 HMM.h 第 1115 行定义.

float64_t get_a ( T_STATES  line_,
T_STATES  column 
) const

access function for matrix a

参数
line_row in matrix 0...N-1
columncolumn in matrix 0...N-1
返回
value at position line colum

在文件 HMM.h 第 1129 行定义.

float64_t get_B ( T_STATES  line_,
uint16_t  column 
) const

access function for matrix B

参数
line_row in matrix 0...N-1
columncolumn in matrix 0...M-1
返回
value at position line colum

在文件 HMM.h 第 1143 行定义.

float64_t get_b ( T_STATES  line_,
uint16_t  column 
) const

access function for matrix b

参数
line_row in matrix 0...N-1
columncolumn in matrix 0...M-1
返回
value at position line colum

在文件 HMM.h 第 1157 行定义.

uint16_t get_best_path_state ( int32_t  dim,
int32_t  t 
)

在文件 HMM.h 第 563 行定义.

virtual float64_t get_derivative ( int32_t  num_param,
int32_t  num_example 
)
virtualinherited

get partial derivative of likelihood function

参数
num_parampartial derivative against which param
num_examplewhich example
返回
derivative of likelihood function

在文件 Distribution.h 第 134 行定义.

float64_t get_epsilon ( )

在文件 HMM.h 第 628 行定义.

virtual CFeatures* get_features ( )
virtualinherited

get feature vectors

返回
feature vectors

在文件 Distribution.h 第 171 行定义.

SGIO * get_global_io ( )
inherited

get the io object

返回
io object

在文件 SGObject.cpp 第 235 行定义.

Parallel * get_global_parallel ( )
inherited

get the parallel object

返回
parallel object

在文件 SGObject.cpp 第 277 行定义.

Version * get_global_version ( )
inherited

get the version object

返回
version object

在文件 SGObject.cpp 第 290 行定义.

int32_t get_iterations ( )

在文件 HMM.h 第 626 行定义.

virtual float64_t get_likelihood_example ( int32_t  num_example)
virtualinherited

compute likelihood for example

参数
num_examplewhich example
返回
likelihood for example

被 CGMM , 以及 CLinearHMM 重载.

在文件 Distribution.h 第 145 行定义.

SGVector< float64_t > get_likelihood_for_all_examples ( )
virtualinherited

compute likelihood for all vectors in sample

返回
likelihood vector for all examples

在文件 Distribution.cpp 第 65 行定义.

float64_t get_log_derivative ( int32_t  num_param,
int32_t  num_example 
)
virtual

get partial derivative of likelihood function (logarithmic)

abstract base method

参数
num_paramderivative against which param
num_examplewhich example
返回
derivative of likelihood (logarithmic)

实现了 CDistribution.

在文件 HMM.cpp 第 5513 行定义.

SGVector< float64_t > get_log_likelihood ( )
virtualinherited

compute log likelihood for each example

返回
log likelihood vector

在文件 Distribution.cpp 第 39 行定义.

virtual float64_t get_log_likelihood_example ( int32_t  num_example)
virtual

compute log likelihood for example

abstract base method

参数
num_examplewhich example
返回
log likelihood for example

实现了 CDistribution.

在文件 HMM.h 第 513 行定义.

float64_t get_log_likelihood_sample ( )
virtualinherited

compute log likelihood for whole sample

返回
log likelihood for whole sample

在文件 Distribution.cpp 第 28 行定义.

float64_t get_log_model_parameter ( int32_t  num_param)
virtual

get model parameter (logarithmic)

abstract base method

返回
model parameter (logarithmic)

实现了 CDistribution.

在文件 HMM.cpp 第 5538 行定义.

int32_t get_M ( ) const

access function for number of observations M

在文件 HMM.h 第 984 行定义.

virtual float64_t get_model_parameter ( int32_t  num_param)
virtualinherited

get model parameter

参数
num_paramwhich param
返回
model parameter

在文件 Distribution.h 第 123 行定义.

SGStringList< char > get_modelsel_names ( )
inherited
返回
vector of names of all parameters which are registered for model selection

在文件 SGObject.cpp 第 498 行定义.

char * get_modsel_param_descr ( const char *  param_name)
inherited

Returns description of a given parameter string, if it exists. SG_ERROR otherwise

参数
param_namename of the parameter
返回
description of the parameter

在文件 SGObject.cpp 第 522 行定义.

index_t get_modsel_param_index ( const char *  param_name)
inherited

Returns index of model selection parameter with provided index

参数
param_namename of model selection parameter
返回
index of model selection parameter with provided name, -1 if there is no such

在文件 SGObject.cpp 第 535 行定义.

T_STATES get_N ( ) const

access function for number of states N

在文件 HMM.h 第 981 行定义.

virtual const char* get_name ( ) const
virtual
返回
object name

实现了 CSGObject.

在文件 HMM.h 第 1186 行定义.

virtual int32_t get_num_model_parameters ( )
virtual

get number of parameters in model

abstract base method

返回
number of parameters in model

实现了 CDistribution.

在文件 HMM.h 第 510 行定义.

int32_t get_num_relevant_model_parameters ( )
virtualinherited

get number of parameters in model that are relevant, i.e. > ALMOST_NEG_INFTY

返回
number of relevant model parameters

在文件 Distribution.cpp 第 52 行定义.

bool get_numbuffer ( FILE *  file,
char *  buffer,
int32_t  length 
)
protected

put a sequence of numbers into the buffer

在文件 HMM.cpp 第 2865 行定义.

CStringFeatures<uint16_t>* get_observations ( )

return observation pointer

在文件 HMM.h 第 799 行定义.

float64_t get_p ( T_STATES  offset) const

access function for probability of initial states

参数
offsetindex 0...N-1
返回
value at offset

在文件 HMM.h 第 1101 行定义.

T_STATES * get_path ( int32_t  dim,
float64_t &  prob 
)

get viterbi path and path probability

参数
dimdimension for which to obtain best path
problikelihood of path
返回
viterbi path

在文件 HMM.cpp 第 4074 行定义.

float64_t get_pseudo ( ) const

returns current pseudo value

在文件 HMM.h 第 752 行定义.

virtual float64_t get_pseudo_count ( )
virtualinherited

get pseudo count

返回
pseudo count

在文件 Distribution.h 第 187 行定义.

T_STATES get_psi ( int32_t  time,
T_STATES  state,
int32_t  dimension 
) const

access function for backtracking table psi

参数
timetime 0...T-1
statestate 0...N-1
dimensiondimension of observations 0...DIMENSION-1
返回
state at specified time and position

在文件 HMM.h 第 1173 行定义.

float64_t get_q ( T_STATES  offset) const

access function for probability of end states

参数
offsetindex 0...N-1
返回
value at offset

在文件 HMM.h 第 1088 行定义.

bool get_status ( ) const

get status

返回
true if everything is ok, else false

在文件 HMM.h 第 746 行定义.

void init_model_defined ( )

init model according to const_x, learn_x. first model is initialized with 0 for all parameters then parameters in learn_x are initialized with random values finally const_x parameters are set and model is normalized.

在文件 HMM.cpp 第 2508 行定义.

void init_model_random ( )

init model with random values

在文件 HMM.cpp 第 2442 行定义.

bool initialize_hmm ( Model *  model,
float64_t  PSEUDO,
FILE *  model_file = NULL 
)

initialization function - gets called by constructors.

参数
modelmodel which holds definitions of states to be learned + consts
PSEUDOPseudo Value
model_fileFilehandle to a hmm model file (*.mod)

在文件 HMM.cpp 第 598 行定义.

void invalidate_model ( )

invalidates all caches. this function has to be called when direct changes to the model have been made. this is necessary for the forward/backward/viterbi algorithms to not work with old tables

在文件 HMM.cpp 第 2717 行定义.

bool is_generic ( EPrimitiveType *  generic) const
virtualinherited

If the SGSerializable is a class template then TRUE will be returned and GENERIC is set to the type of the generic.

参数
genericset to the type of the generic if returning TRUE
返回
TRUE if a class template.

在文件 SGObject.cpp 第 296 行定义.

float64_t linear_model_derivative ( T_STATES  i,
uint16_t  j,
int32_t  dimension 
)

computes log dp(lambda)/d b_ij for linear model

在文件 HMM.h 第 1393 行定义.

float64_t linear_model_probability ( int32_t  dimension)

calculates likelihood for linear model on observations in MEMORY

参数
dimensiondimension for which probability is calculated
返回
model probability

在文件 HMM.h 第 593 行定义.

bool linear_train ( bool  right_align = false)

estimates linear model from observations.

在文件 HMM.cpp 第 5151 行定义.

bool load_definitions ( FILE *  file,
bool  verbose,
bool  initialize = true 
)

read definitions file (learn_x,const_x) used for training. -format specs: definition_file (train.def) % HMM-TRAIN - specification % learn_a - elements in state_transition_matrix to be learned % learn_b - elements in oberservation_per_state_matrix to be learned % note: each line stands for % state, observation(0), observation(1)...observation(NOW) % learn_p - elements in initial distribution to be learned % learn_q - elements in the end-state distribution to be learned % % const_x - specifies initial values of elements % rest is assumed to be 0.0 % % NOTE: IMPLICIT DEFINES: % define A 0 % define C 1 % define G 2 % define T 3

learn_a=[ [int32_t,int32_t]; [int32_t,int32_t]; [int32_t,int32_t]; ........ [int32_t,int32_t]; [-1,-1]; ];

learn_b=[ [int32_t,int32_t,int32_t,...,int32_t]; [int32_t,int32_t,int32_t,...,int32_t]; [int32_t,int32_t,int32_t,...,int32_t]; ........ [int32_t,int32_t,int32_t,...,int32_t]; [-1,-1]; ];

learn_p= [ int32_t, ... , int32_t, -1 ];

learn_q= [ int32_t, ... , int32_t, -1 ];

const_a=[ [int32_t,int32_t,float64_t]; [int32_t,int32_t,float64_t]; [int32_t,int32_t,float64_t]; ........ [int32_t,int32_t,float64_t]; [-1,-1,-1]; ];

const_b=[ [int32_t,int32_t,int32_t,...,int32_t,float64_t]; [int32_t,int32_t,int32_t,...,int32_t,float64_t]; [int32_t,int32_t,int32_t,...,int32_t,<DOUBLE]; ........ [int32_t,int32_t,int32_t,...,int32_t,float64_t]; [-1,-1,-1]; ];

const_p[]=[ [int32_t, float64_t], ... , [int32_t,float64_t], [-1,-1] ]; const_q[]=[ [int32_t, float64_t], ... , [int32_t,float64_t], [-1,-1] ];

参数
filefilehandle to definitions file
verbosetrue for verbose messages
initializetrue to initialize to underlying HMM

在文件 HMM.cpp 第 3273 行定义.

bool load_model ( FILE *  file)

read model from file. -format specs: model_file (model.hmm) % HMM - specification % N - number of states % M - number of observation_tokens % a is state_transition_matrix % size(a)= [N,N] % % b is observation_per_state_matrix % size(b)= [N,M] % % p is initial distribution % size(p)= [1, N]

N=int32_t; M=int32_t;

p=[float64_t,float64_t...float64_t]; q=[float64_t,float64_t...float64_t];

a=[ [float64_t,float64_t...float64_t]; [float64_t,float64_t...float64_t]; [float64_t,float64_t...float64_t]; [float64_t,float64_t...float64_t]; [float64_t,float64_t...float64_t]; ];

b=[ [float64_t,float64_t...float64_t]; [float64_t,float64_t...float64_t]; [float64_t,float64_t...float64_t]; [float64_t,float64_t...float64_t]; [float64_t,float64_t...float64_t]; ];

参数
filefilehandle to model file

在文件 HMM.cpp 第 2974 行定义.

bool load_serializable ( CSerializableFile *  file,
const char *  prefix = "" 
)
virtualinherited

Load this object from file. If it will fail (returning FALSE) then this object will contain inconsistent data and should not be used!

参数
filewhere to load from
prefixprefix for members
返回
TRUE if done, otherwise FALSE

在文件 SGObject.cpp 第 369 行定义.

void load_serializable_post ( )
throw (ShogunException
)
protectedvirtualinherited

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 occurs.

被 CKernel, CWeightedDegreePositionStringKernel, CList, CAlphabet, CLinearHMM, CGaussianKernel, CInverseMultiQuadricKernel, CCircularKernel , 以及 CExponentialKernel 重载.

在文件 SGObject.cpp 第 426 行定义.

void load_serializable_pre ( )
throw (ShogunException
)
protectedvirtualinherited

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

异常
ShogunExceptionwill be thrown if an error occurs.

被 CDynamicArray< T >, CDynamicArray< float64_t >, CDynamicArray< float32_t >, CDynamicArray< int32_t >, CDynamicArray< char >, CDynamicArray< bool > , 以及 CDynamicObjectArray 重载.

在文件 SGObject.cpp 第 421 行定义.

float64_t model_derivative_a ( T_STATES  i,
T_STATES  j,
int32_t  dimension 
)

computes log dp(lambda)/d a_ij.

在文件 HMM.h 第 1424 行定义.

float64_t model_derivative_b ( T_STATES  i,
uint16_t  j,
int32_t  dimension 
)

computes log dp(lambda)/d b_ij.

在文件 HMM.h 第 1435 行定义.

float64_t model_derivative_p ( T_STATES  i,
int32_t  dimension 
)

computes log dp(lambda)/d p_i. backward path downto time 0 multiplied by observing first symbol in path at state i

在文件 HMM.h 第 1410 行定义.

float64_t model_derivative_q ( T_STATES  i,
int32_t  dimension 
)

computes log dp(lambda)/d q_i. forward path upto time T-1

在文件 HMM.h 第 1418 行定义.

float64_t model_probability ( int32_t  dimension = -1)

inline proxy for model probability.

在文件 HMM.h 第 574 行定义.

float64_t model_probability_comp ( )

calculates probability that observations were generated by the model using forward algorithm.

在文件 HMM.cpp 第 1282 行定义.

void normalize ( bool  keep_dead_states = false)

normalize the model to satisfy stochasticity

在文件 HMM.cpp 第 4828 行定义.

CDistribution * obtain_from_generic ( CSGObject *  object)
staticinherited

obtain from generic

参数
objectgeneric object
返回
Distribution object

在文件 Distribution.cpp 第 85 行定义.

void open_bracket ( FILE *  file)
protected

expect open bracket.

在文件 HMM.cpp 第 2804 行定义.

void output_model ( bool  verbose = false)

prints the model parameters on screen.

参数
verbosewhen false only the model probability will be printed when true the whole model will be printed additionally

在文件 HMM.cpp 第 2256 行定义.

void output_model_defined ( bool  verbose = false)

performs output_model only for the defined transitions etc

在文件 HMM.cpp 第 2340 行定义.

bool parameter_hash_changed ( )
virtualinherited
返回
whether parameter combination has changed since last update

在文件 SGObject.cpp 第 262 行定义.

float64_t path_derivative_a ( T_STATES  i,
T_STATES  j,
int32_t  dimension 
)

computes d log p(lambda,best_path)/d a_ij

在文件 HMM.h 第 1471 行定义.

float64_t path_derivative_b ( T_STATES  i,
uint16_t  j,
int32_t  dimension 
)

computes d log p(lambda,best_path)/d b_ij

在文件 HMM.h 第 1478 行定义.

float64_t path_derivative_p ( T_STATES  i,
int32_t  dimension 
)

computes d log p(lambda,best_path)/d p_i

在文件 HMM.h 第 1457 行定义.

float64_t path_derivative_q ( T_STATES  i,
int32_t  dimension 
)

computes d log p(lambda,best_path)/d q_i

在文件 HMM.h 第 1464 行定义.

bool permutation_entropy ( int32_t  window_width,
int32_t  sequence_number 
)

compute permutation entropy

在文件 HMM.cpp 第 5455 行定义.

void prepare_path_derivative ( int32_t  dim)
protected

initialization function that is called before path_derivatives are calculated

在文件 HMM.h 第 1515 行定义.

void print_modsel_params ( )
inherited

prints all parameter registered for model selection and their type

在文件 SGObject.cpp 第 474 行定义.

void print_serializable ( const char *  prefix = "")
virtualinherited

prints registered parameters out

参数
prefixprefix for members

在文件 SGObject.cpp 第 308 行定义.

bool save_likelihood ( FILE *  file)

save model probability in ascii format

参数
filefilehandle

在文件 HMM.cpp 第 4128 行定义.

bool save_likelihood_bin ( FILE *  file)

save model probability in binary format

参数
filefilehandle

在文件 HMM.cpp 第 4111 行定义.

bool save_model ( FILE *  file)

save model to file.

参数
filefilehandle to model file

在文件 HMM.cpp 第 3978 行定义.

bool save_model_bin ( FILE *  file)

save model in binary format.

参数
filefilehandle

在文件 HMM.cpp 第 4149 行定义.

bool save_model_derivatives ( FILE *  file)

save model derivatives to file in ascii format.

参数
filefilehandle

在文件 HMM.cpp 第 4502 行定义.

bool save_model_derivatives_bin ( FILE *  file)

save model derivatives to file in binary format.

参数
filefilehandle

在文件 HMM.cpp 第 4381 行定义.

bool save_path ( FILE *  file)

save viterbi path in ascii format

参数
filefilehandle

在文件 HMM.cpp 第 4087 行定义.

bool save_path_derivatives ( FILE *  file)

save viterbi path in ascii format

参数
filefilehandle

在文件 HMM.cpp 第 4251 行定义.

bool save_path_derivatives_bin ( FILE *  file)

save viterbi path in binary format

参数
filefilehandle

在文件 HMM.cpp 第 4298 行定义.

bool save_serializable ( CSerializableFile *  file,
const char *  prefix = "" 
)
virtualinherited

Save this object to file.

参数
filewhere to save the object; will be closed during returning if PREFIX is an empty string.
prefixprefix for members
返回
TRUE if done, otherwise FALSE

在文件 SGObject.cpp 第 314 行定义.

void save_serializable_post ( )
throw (ShogunException
)
protectedvirtualinherited

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::SAVE_SERIALIZABLE_POST is called.

异常
ShogunExceptionwill be thrown if an error occurs.

被 CKernel 重载.

在文件 SGObject.cpp 第 436 行定义.

void save_serializable_pre ( )
throw (ShogunException
)
protectedvirtualinherited

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

异常
ShogunExceptionwill be thrown if an error occurs.

被 CKernel, CDynamicArray< T >, CDynamicArray< float64_t >, CDynamicArray< float32_t >, CDynamicArray< int32_t >, CDynamicArray< char >, CDynamicArray< bool > , 以及 CDynamicObjectArray 重载.

在文件 SGObject.cpp 第 431 行定义.

void set_A ( T_STATES  line_,
T_STATES  column,
float64_t  value 
)

access function for matrix A

参数
line_row in matrix 0...N-1
columncolumn in matrix 0...N-1
valuevalue to be set

在文件 HMM.h 第 1017 行定义.

void set_a ( T_STATES  line_,
T_STATES  column,
float64_t  value 
)

access function for matrix a

参数
line_row in matrix 0...N-1
columncolumn in matrix 0...N-1
valuevalue to be set

在文件 HMM.h 第 1031 行定义.

void set_B ( T_STATES  line_,
uint16_t  column,
float64_t  value 
)

access function for matrix B

参数
line_row in matrix 0...N-1
columncolumn in matrix 0...M-1
valuevalue to be set

在文件 HMM.h 第 1045 行定义.

void set_b ( T_STATES  line_,
uint16_t  column,
float64_t  value 
)

access function for matrix b

参数
line_row in matrix 0...N-1
columncolumn in matrix 0...M-1
valuevalue to be set

在文件 HMM.h 第 1059 行定义.

bool set_epsilon ( float64_t  eps)

在文件 HMM.h 第 627 行定义.

virtual void set_features ( CFeatures *  f)
virtualinherited

set feature vectors

参数
fnew feature vectors

在文件 Distribution.h 第 160 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 41 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 46 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 51 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 56 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 61 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 66 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 71 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 76 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 81 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 86 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 91 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 96 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 101 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 106 行定义.

void set_generic ( )
inherited

在文件 SGObject.cpp 第 111 行定义.

void set_generic ( )
inherited

set generic type to T

void set_global_io ( SGIO *  io)
inherited

set the io object

参数
ioio object to use

在文件 SGObject.cpp 第 228 行定义.

void set_global_parallel ( Parallel *  parallel)
inherited

set the parallel object

参数
parallelparallel object to use

在文件 SGObject.cpp 第 241 行定义.

void set_global_version ( Version *  version)
inherited

set the version object

参数
versionversion object to use

在文件 SGObject.cpp 第 283 行定义.

bool set_iterations ( int32_t  num)

在文件 HMM.h 第 625 行定义.

void set_observation_nocache ( CStringFeatures< uint16_t > *  obs)

set new observations only set the observation pointer and drop caches if there were any

在文件 HMM.cpp 第 5268 行定义.

void set_observations ( CStringFeatures< uint16_t > *  obs,
CHMM *  hmm = NULL 
)

observation functions set/get observation matrix set new observations sets the observation pointer and initializes observation-dependent caches if hmm is given, then the caches of the model hmm are used

在文件 HMM.cpp 第 5310 行定义.

void set_p ( T_STATES  offset,
float64_t  value 
)

access function for probability of first state

参数
offsetindex 0...N-1
valuevalue to be set

在文件 HMM.h 第 1003 行定义.

void set_pseudo ( float64_t  pseudo)

sets current pseudo value

在文件 HMM.h 第 758 行定义.

virtual void set_pseudo_count ( float64_t  pseudo)
virtualinherited

set pseudo count

参数
pseudonew pseudo count

在文件 Distribution.h 第 181 行定义.

void set_psi ( int32_t  time,
T_STATES  state,
T_STATES  value,
int32_t  dimension 
)

access function for backtracking table psi

参数
timetime 0...T-1
statestate 0...N-1
valuevalue to be set
dimensiondimension of observations 0...DIMENSION-1

在文件 HMM.h 第 1074 行定义.

void set_q ( T_STATES  offset,
float64_t  value 
)

access function for probability of end states

参数
offsetindex 0...N-1
valuevalue to be set

在文件 HMM.h 第 990 行定义.

CSGObject * shallow_copy ( ) const
virtualinherited

A shallow copy. All the SGObject instance variables will be simply assigned and SG_REF-ed.

被 CGaussianKernel 重载.

在文件 SGObject.cpp 第 192 行定义.

float64_t state_probability ( int32_t  time,
int32_t  state,
int32_t  dimension 
)

calculates probability of being in state i at time t for dimension

在文件 HMM.h 第 1369 行定义.

bool train ( CFeatures *  data = NULL)
virtual

learn 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.

在文件 HMM.cpp 第 489 行定义.

float64_t transition_probability ( int32_t  time,
int32_t  state_i,
int32_t  state_j,
int32_t  dimension 
)

calculates probability of being in state i at time t and state j at time t+1 for dimension

在文件 HMM.h 第 1376 行定义.

void unset_generic ( )
inherited

unset generic type

this has to be called in classes specializing a template class

在文件 SGObject.cpp 第 303 行定义.

void update_parameter_hash ( )
virtualinherited

Updates the hash of current parameter combination

在文件 SGObject.cpp 第 248 行定义.

float64_t update_params_em ( float64_t *  alpha_k,
int32_t  len 
)
virtualinherited

update parameters in the em maximization step for mixture model of which this distribution is a part

abstract base method

参数
alpha_k"belongingness" values of various data points
lenlength of alpha_k array
返回
sum of alpha_k values

被 CGaussian 重载.

在文件 Distribution.cpp 第 78 行定义.

类成员变量说明

float64_t all_pat_prob
protected

probability of best path

在文件 HMM.h 第 1238 行定义.

bool all_path_prob_updated
protected

true if path probability is up to date

在文件 HMM.h 第 1250 行定义.

T_ALPHA_BETA alpha_cache
protected

cache for forward variables can be terrible HUGE O(T*N)

在文件 HMM.h 第 1311 行定义.

float64_t* arrayN1
protected

array of size N for temporary calculations

在文件 HMM.h 第 1275 行定义.

float64_t* arrayN2
protected

array of size N for temporary calculations

在文件 HMM.h 第 1277 行定义.

T_ALPHA_BETA beta_cache
protected

cache for backward variables can be terrible HUGE O(T*N)

在文件 HMM.h 第 1313 行定义.

int32_t conv_it
protected

在文件 HMM.h 第 1235 行定义.

float64_t* end_state_distribution_q
protected

distribution of end-states

在文件 HMM.h 第 1224 行定义.

float64_t epsilon
protected

convergence criterion epsilon

在文件 HMM.h 第 1234 行定义.

CFeatures* features
protectedinherited

feature vectors

在文件 Distribution.h 第 209 行定义.

const int32_t GOTa = (1<<4)
staticprotected

GOTa

在文件 HMM.h 第 1337 行定义.

const int32_t GOTb = (1<<5)
staticprotected

GOTb

在文件 HMM.h 第 1339 行定义.

const int32_t GOTconst_a = (1<<5)
staticprotected

GOTconst_a

在文件 HMM.h 第 1354 行定义.

const int32_t GOTconst_b = (1<<6)
staticprotected

GOTconst_b

在文件 HMM.h 第 1356 行定义.

const int32_t GOTconst_p = (1<<7)
staticprotected

GOTconst_p

在文件 HMM.h 第 1358 行定义.

const int32_t GOTconst_q = (1<<8)
staticprotected

GOTconst_q

在文件 HMM.h 第 1360 行定义.

const int32_t GOTlearn_a = (1<<1)
staticprotected

GOTlearn_a

在文件 HMM.h 第 1346 行定义.

const int32_t GOTlearn_b = (1<<2)
staticprotected

GOTlearn_b

在文件 HMM.h 第 1348 行定义.

const int32_t GOTlearn_p = (1<<3)
staticprotected

GOTlearn_p

在文件 HMM.h 第 1350 行定义.

const int32_t GOTlearn_q = (1<<4)
staticprotected

GOTlearn_q

在文件 HMM.h 第 1352 行定义.

const int32_t GOTM = (1<<2)
staticprotected

GOTM

在文件 HMM.h 第 1333 行定义.

const int32_t GOTN = (1<<1)
staticprotected

GOTN

在文件 HMM.h 第 1331 行定义.

const int32_t GOTO = (1<<3)
staticprotected

GOTO

在文件 HMM.h 第 1335 行定义.

const int32_t GOTp = (1<<6)
staticprotected

GOTp

在文件 HMM.h 第 1341 行定义.

const int32_t GOTq = (1<<7)
staticprotected

GOTq

在文件 HMM.h 第 1343 行定义.

float64_t* initial_state_distribution_p
protected

initial distribution of states

在文件 HMM.h 第 1221 行定义.

SGIO* io
inherited

io

在文件 SGObject.h 第 369 行定义.

int32_t iteration_count
protected

在文件 HMM.h 第 1231 行定义.

int32_t iterations
protected

convergence criterion iterations

在文件 HMM.h 第 1230 行定义.

int32_t line
protected

在文件 HMM.h 第 1203 行定义.

bool loglikelihood
protected

在文件 HMM.h 第 1259 行定义.

int32_t M
protected

number of observation symbols eg. ACGT -> 0123

在文件 HMM.h 第 1194 行定义.

Parameter* m_gradient_parameters
inherited

parameters wrt which we can compute gradients

在文件 SGObject.h 第 384 行定义.

uint32_t m_hash
inherited

Hash of parameter values

在文件 SGObject.h 第 387 行定义.

Parameter* m_model_selection_parameters
inherited

model selection parameters

在文件 SGObject.h 第 381 行定义.

Parameter* m_parameters
inherited

parameters

在文件 SGObject.h 第 378 行定义.

float64_t mod_prob
protected

probability of model

在文件 HMM.h 第 1244 行定义.

bool mod_prob_updated
protected

true if model probability is up to date

在文件 HMM.h 第 1247 行定义.

Model* model
protected

在文件 HMM.h 第 1209 行定义.

int32_t N
protected

number of states

在文件 HMM.h 第 1197 行定义.

float64_t* observation_matrix_B
protected

matrix of absolute counts of observations within each state

在文件 HMM.h 第 1215 行定义.

float64_t* observation_matrix_b
protected

distribution of observations within each state

在文件 HMM.h 第 1227 行定义.

CStringFeatures<uint16_t>* p_observations
protected

observation matrix

在文件 HMM.h 第 1206 行定义.

Parallel* parallel
inherited

parallel

在文件 SGObject.h 第 372 行定义.

float64_t pat_prob
protected

probability of best path

在文件 HMM.h 第 1241 行定义.

T_STATES* path
protected

best path (=state sequence) through model

在文件 HMM.h 第 1319 行定义.

int32_t path_deriv_dimension
protected

dimension for which path_deriv was calculated

在文件 HMM.h 第 1253 行定义.

bool path_deriv_updated
protected

true if path derivative is up to date

在文件 HMM.h 第 1256 行定义.

int32_t path_prob_dimension
protected

dimension for which path_prob was calculated

在文件 HMM.h 第 1325 行定义.

bool path_prob_updated
protected

true if path probability is up to date

在文件 HMM.h 第 1322 行定义.

float64_t PSEUDO
protected

define pseudocounts against overfitting

在文件 HMM.h 第 1200 行定义.

float64_t pseudo_count
protectedinherited

pseudo count

在文件 Distribution.h 第 211 行定义.

bool reused_caches
protected

在文件 HMM.h 第 1265 行定义.

T_STATES* states_per_observation_psi
protected

backtracking table for viterbi can be terrible HUGE O(T*N)

在文件 HMM.h 第 1316 行定义.

bool status
protected

在文件 HMM.h 第 1262 行定义.

float64_t* transition_matrix_A
protected

matrix of absolute counts of transitions

在文件 HMM.h 第 1212 行定义.

float64_t* transition_matrix_a
protected

transition matrix

在文件 HMM.h 第 1218 行定义.

Version* version
inherited

version

在文件 SGObject.h 第 375 行定义.


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

SHOGUN 机器学习工具包 - 项目文档