CTOPFeatures Class Reference

Inheritance diagram for CTOPFeatures:

Inheritance graph
[legend]

List of all members.

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_tset_feature_matrix ()
int32_t compute_num_features ()
bool compute_relevant_indizes (CHMM *hmm, T_HMM_INDIZES *hmm_idx)

Protected Member Functions

virtual float64_tcompute_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

CHMMpos
CHMMneg
bool neglinear
bool poslinear
T_HMM_INDIZES pos_relevant_indizes
T_HMM_INDIZES neg_relevant_indizes


Detailed Description

The class TOPFeatures implements TOP kernel features obtained from two Hidden Markov models and 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.

Definition at line 59 of file TOPFeatures.h.


Constructor & Destructor Documentation

CTOPFeatures::CTOPFeatures ( int32_t  size,
CHMM p,
CHMM n,
bool  neglin,
bool  poslin 
)

constructor

Parameters:
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.


Member Function Documentation

void CTOPFeatures::compute_feature_vector ( float64_t addr,
int32_t  num,
int32_t &  len 
) [protected]

computes the feature vector to the address addr

Parameters:
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

Parameters:
num num
len len
target 
Returns:
something floaty

Reimplemented from CSimpleFeatures< float64_t >.

Definition at line 75 of file TOPFeatures.cpp.

int32_t CTOPFeatures::compute_num_features (  ) 

compute number of features

Returns:
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

Parameters:
hmm HMM to compute for
hmm_idx HMM index
Returns:
if computing was successful

Definition at line 219 of file TOPFeatures.cpp.

float64_t * CTOPFeatures::set_feature_matrix (  )  [virtual]

set feature matrix

Returns:
something floaty

Definition at line 180 of file TOPFeatures.cpp.

void CTOPFeatures::set_models ( CHMM p,
CHMM n 
)

set HMMs

Parameters:
p positive HMM
n negative HMM

Definition at line 51 of file TOPFeatures.cpp.


Member Data Documentation

CHMM* CTOPFeatures::neg [protected]

negative HMM

Definition at line 127 of file TOPFeatures.h.

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.

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.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation