Public Member Functions | |
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) |
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) |
Protected Attributes | |
CHMM * | pos |
CHMM * | neg |
bool | neglinear |
bool | poslinear |
T_HMM_INDIZES | pos_relevant_indizes |
T_HMM_INDIZES | neg_relevant_indizes |
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.
Definition at line 59 of file TOPFeatures.h.
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 |
Definition at line 16 of file TOPFeatures.cpp.
CTOPFeatures::CTOPFeatures | ( | const CTOPFeatures & | orig | ) |
copy constructor
Definition at line 25 of file TOPFeatures.cpp.
CTOPFeatures::~CTOPFeatures | ( | ) | [virtual] |
Definition at line 31 of file TOPFeatures.cpp.
void CTOPFeatures::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 91 of file TOPFeatures.cpp.
float64_t * CTOPFeatures::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 75 of file TOPFeatures.cpp.
int32_t CTOPFeatures::compute_num_features | ( | ) |
compute number of features
Definition at line 322 of file TOPFeatures.cpp.
bool CTOPFeatures::compute_relevant_indizes | ( | CHMM * | hmm, | |
T_HMM_INDIZES * | hmm_idx | |||
) |
compute relevant indices
hmm | HMM to compute for | |
hmm_idx | HMM index |
Definition at line 219 of file TOPFeatures.cpp.
float64_t * CTOPFeatures::set_feature_matrix | ( | ) | [virtual] |
CHMM* CTOPFeatures::neg [protected] |
negative HMM
Definition at line 127 of file TOPFeatures.h.
T_HMM_INDIZES CTOPFeatures::neg_relevant_indizes [protected] |
negative relevant indices
Definition at line 136 of file TOPFeatures.h.
bool CTOPFeatures::neglinear [protected] |
if negative HMM is a LinearHMM
Definition at line 129 of file TOPFeatures.h.
CHMM* CTOPFeatures::pos [protected] |
positive HMM
Definition at line 125 of file TOPFeatures.h.
T_HMM_INDIZES CTOPFeatures::pos_relevant_indizes [protected] |
positive relevant indices
Definition at line 134 of file TOPFeatures.h.
bool CTOPFeatures::poslinear [protected] |
if positive HMM is a LinearHMM
Definition at line 131 of file TOPFeatures.h.