SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
CTOPFeatures Class Reference

Detailed Description

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.

Definition at line 68 of file TOPFeatures.h.

Inheritance diagram for CTOPFeatures:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

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

Constructor & Destructor Documentation

default constructor

Definition at line 18 of file TOPFeatures.cpp.

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

constructor

Parameters:
sizecache size
ppositive HMM
nnegative HMM
neglinif negative HMM is of linear shape
poslinif positive HMM is of linear shape

Definition at line 23 of file TOPFeatures.cpp.

CTOPFeatures ( const CTOPFeatures orig)

copy constructor

Definition at line 34 of file TOPFeatures.cpp.

~CTOPFeatures ( ) [virtual]

Definition at line 44 of file TOPFeatures.cpp.


Member Function Documentation

float64_t * compute_feature_vector ( int32_t  num,
int32_t &  len,
float64_t target = NULL 
) [protected, virtual]

compute feature vector

Parameters:
numnum
lenlen
target
Returns:
something floaty

Reimplemented from CSimpleFeatures< float64_t >.

Definition at line 88 of file TOPFeatures.cpp.

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

computes the feature vector to the address addr

Parameters:
addraddress
numnum
lenlen

Definition at line 104 of file TOPFeatures.cpp.

int32_t compute_num_features ( )

compute number of features

Returns:
number of features

Definition at line 335 of file TOPFeatures.cpp.

bool compute_relevant_indizes ( CHMM hmm,
T_HMM_INDIZES *  hmm_idx 
)

compute relevant indices

Parameters:
hmmHMM to compute for
hmm_idxHMM index
Returns:
if computing was successful

Definition at line 232 of file TOPFeatures.cpp.

virtual const char* get_name ( ) const [virtual]
Returns:
object name

Reimplemented from CSimpleFeatures< float64_t >.

Definition at line 117 of file TOPFeatures.h.

float64_t * set_feature_matrix ( ) [virtual]

set feature matrix

Returns:
something floaty

Definition at line 193 of file TOPFeatures.cpp.

void set_models ( CHMM p,
CHMM n 
)

set HMMs

Parameters:
ppositive HMM
nnegative HMM

Definition at line 64 of file TOPFeatures.cpp.


Member Data Documentation

CHMM* neg [protected]

negative HMM

Definition at line 145 of file TOPFeatures.h.

T_HMM_INDIZES neg_relevant_indizes [protected]

negative relevant indices

Definition at line 154 of file TOPFeatures.h.

bool neglinear [protected]

if negative HMM is a LinearHMM

Definition at line 147 of file TOPFeatures.h.

CHMM* pos [protected]

positive HMM

Definition at line 143 of file TOPFeatures.h.

T_HMM_INDIZES pos_relevant_indizes [protected]

positive relevant indices

Definition at line 152 of file TOPFeatures.h.

bool poslinear [protected]

if positive HMM is a LinearHMM

Definition at line 149 of file TOPFeatures.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation