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.
Definition at line 41 of file FKFeatures.h.
Public Member Functions | |
CFKFeatures () | |
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 |
Protected Member Functions | |
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) |
Protected Attributes | |
CHMM * | pos |
CHMM * | neg |
float64_t * | pos_prob |
float64_t * | neg_prob |
float64_t | weight_a |
CFKFeatures | ( | ) |
default constructor
Definition at line 19 of file FKFeatures.cpp.
CFKFeatures | ( | int32_t | size, | |
CHMM * | p, | |||
CHMM * | n | |||
) |
constructor
size | cache size | |
p | positive HMM | |
n | negative HMM |
Definition at line 24 of file FKFeatures.cpp.
CFKFeatures | ( | const CFKFeatures & | orig | ) |
copy constructor
Definition at line 32 of file FKFeatures.cpp.
~CFKFeatures | ( | ) | [virtual] |
Definition at line 37 of file FKFeatures.cpp.
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 |
Reimplemented from CSimpleFeatures< float64_t >.
Definition at line 148 of file FKFeatures.cpp.
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 |
Definition at line 168 of file FKFeatures.cpp.
float64_t get_a | ( | ) |
virtual const char* get_name | ( | void | ) | const [virtual] |
Reimplemented from CSimpleFeatures< float64_t >.
Definition at line 105 of file FKFeatures.h.
float64_t get_weight_a | ( | ) |
void set_a | ( | float64_t | a | ) |
float64_t * set_feature_matrix | ( | ) | [virtual] |
negative HMM
Definition at line 140 of file FKFeatures.h.
negative prob
Definition at line 144 of file FKFeatures.h.
positive HMM
Definition at line 138 of file FKFeatures.h.
positive prob
Definition at line 142 of file FKFeatures.h.
weight a
Definition at line 146 of file FKFeatures.h.