The class FKFeatures implements Fischer 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 FK-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.
在文件FKFeatures.h第41行定义。
公有成员 | |
CFKFeatures (int32_t size, CHMM *p, CHMM *n) | |
CFKFeatures (const CFKFeatures &orig) | |
virtual | ~CFKFeatures () |
void | set_models (CHMM *p, CHMM *n) |
void | set_a (float64_t a) |
float64_t | get_a () |
virtual float64_t * | set_feature_matrix () |
float64_t | set_opt_a (float64_t a=-1) |
float64_t | get_weight_a () |
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) |
float64_t | deriv_a (float64_t a, int32_t dimension=-1) |
保护属性 | |
CHMM * | pos |
CHMM * | neg |
float64_t * | pos_prob |
float64_t * | neg_prob |
float64_t | weight_a |
CFKFeatures | ( | int32_t | size, |
CHMM * | p, | ||
CHMM * | n | ||
) |
CFKFeatures | ( | const CFKFeatures & | orig ) |
copy constructor
在文件FKFeatures.cpp第27行定义。
~CFKFeatures | ( | ) | [virtual] |
在文件FKFeatures.cpp第32行定义。
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 >。
在文件FKFeatures.cpp第143行定义。
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 |
在文件FKFeatures.cpp第163行定义。
float64_t get_a | ( | ) |
virtual const char* get_name | ( | ) | const [virtual] |
float64_t get_weight_a | ( | ) |
void set_a | ( | float64_t | a ) |
float64_t * set_feature_matrix | ( | ) | [virtual] |
negative HMM
在文件FKFeatures.h第134行定义。
negative prob
在文件FKFeatures.h第138行定义。
positive HMM
在文件FKFeatures.h第132行定义。
positive prob
在文件FKFeatures.h第136行定义。
weight a
在文件FKFeatures.h第140行定义。