The class TOPFeatures implements TOP kernel features obtained from two Hidden Markov models.
It was used in
K. Tsuda, M. Kawanabe, G. Raetsch, S. Sonnenburg, and K.R. Mueller. A new discriminative kernel from probabilistic models. Neural Computation, 14:2397-2414, 2002.
which also has the details.
Note that TOP-features are computed on the fly, so to be effective feature caching should be enabled.
It inherits its functionality from CSimpleFeatures, which should be consulted for further reference.
在文件TOPFeatures.h第68行定义。
公有成员 | |
CTOPFeatures (int32_t size, CHMM *p, CHMM *n, bool neglin, bool poslin) | |
CTOPFeatures (const CTOPFeatures &orig) | |
virtual | ~CTOPFeatures () |
void | set_models (CHMM *p, CHMM *n) |
virtual float64_t * | set_feature_matrix () |
int32_t | compute_num_features () |
bool | compute_relevant_indizes (CHMM *hmm, T_HMM_INDIZES *hmm_idx) |
virtual const char * | get_name () const |
保护成员 | |
virtual float64_t * | compute_feature_vector (int32_t num, int32_t &len, float64_t *target=NULL) |
void | compute_feature_vector (float64_t *addr, int32_t num, int32_t &len) |
保护属性 | |
CHMM * | pos |
CHMM * | neg |
bool | neglinear |
bool | poslinear |
T_HMM_INDIZES | pos_relevant_indizes |
T_HMM_INDIZES | neg_relevant_indizes |
CTOPFeatures | ( | int32_t | size, | |
CHMM * | p, | |||
CHMM * | n, | |||
bool | neglin, | |||
bool | poslin | |||
) |
constructor
size | cache size | |
p | positive HMM | |
n | negative HMM | |
neglin | if negative HMM is of linear shape | |
poslin | if positive HMM is of linear shape |
在文件TOPFeatures.cpp第18行定义。
CTOPFeatures | ( | const CTOPFeatures & | orig | ) |
copy constructor
在文件TOPFeatures.cpp第27行定义。
~CTOPFeatures | ( | ) | [virtual] |
在文件TOPFeatures.cpp第33行定义。
float64_t * compute_feature_vector | ( | int32_t | num, | |
int32_t & | len, | |||
float64_t * | target = NULL | |||
) | [protected, virtual] |
compute feature vector
num | num | |
len | len | |
target |
重载CSimpleFeatures< float64_t >。
在文件TOPFeatures.cpp第77行定义。
void compute_feature_vector | ( | float64_t * | addr, | |
int32_t | num, | |||
int32_t & | len | |||
) | [protected] |
computes the feature vector to the address addr
addr | address | |
num | num | |
len | len |
在文件TOPFeatures.cpp第93行定义。
int32_t compute_num_features | ( | ) |
bool compute_relevant_indizes | ( | CHMM * | hmm, | |
T_HMM_INDIZES * | hmm_idx | |||
) |
compute relevant indices
hmm | HMM to compute for | |
hmm_idx | HMM index |
在文件TOPFeatures.cpp第221行定义。
virtual const char* get_name | ( | ) | const [virtual] |
float64_t * set_feature_matrix | ( | ) | [virtual] |
negative HMM
在文件TOPFeatures.h第139行定义。
T_HMM_INDIZES neg_relevant_indizes [protected] |
negative relevant indices
在文件TOPFeatures.h第148行定义。
bool neglinear [protected] |
if negative HMM is a LinearHMM
在文件TOPFeatures.h第141行定义。
positive HMM
在文件TOPFeatures.h第137行定义。
T_HMM_INDIZES pos_relevant_indizes [protected] |
positive relevant indices
在文件TOPFeatures.h第146行定义。
bool poslinear [protected] |
if positive HMM is a LinearHMM
在文件TOPFeatures.h第143行定义。