SHOGUN v0.9.0
|
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 () | |
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 | ( | ) |
default constructor
在文件TOPFeatures.cpp第18行定义。
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第23行定义。
CTOPFeatures | ( | const CTOPFeatures & | orig | ) |
copy constructor
在文件TOPFeatures.cpp第34行定义。
~CTOPFeatures | ( | ) | [virtual] |
在文件TOPFeatures.cpp第44行定义。
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第88行定义。
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第104行定义。
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第232行定义。
virtual const char* get_name | ( | void | ) | const [virtual] |
float64_t * set_feature_matrix | ( | ) | [virtual] |
negative HMM
在文件TOPFeatures.h第145行定义。
T_HMM_INDIZES neg_relevant_indizes [protected] |
negative relevant indices
在文件TOPFeatures.h第154行定义。
bool neglinear [protected] |
if negative HMM is a LinearHMM
在文件TOPFeatures.h第147行定义。
positive HMM
在文件TOPFeatures.h第143行定义。
T_HMM_INDIZES pos_relevant_indizes [protected] |
positive relevant indices
在文件TOPFeatures.h第152行定义。
bool poslinear [protected] |
if positive HMM is a LinearHMM
在文件TOPFeatures.h第149行定义。