Public Member Functions | Protected Member Functions | Protected Attributes

CFKFeatures Class Reference


Detailed Description

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.

Inheritance diagram for CFKFeatures:
Inheritance graph
[legend]

List of all members.

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_tset_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_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)
float64_t deriv_a (float64_t a, int32_t dimension=-1)

Protected Attributes

CHMMpos
CHMMneg
float64_tpos_prob
float64_tneg_prob
float64_t weight_a

Constructor & Destructor Documentation

CFKFeatures (  ) 

default constructor

Definition at line 19 of file FKFeatures.cpp.

CFKFeatures ( int32_t  size,
CHMM p,
CHMM n 
)

constructor

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


Member Function Documentation

float64_t * 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 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

Parameters:
addr address
num num
len len

Definition at line 168 of file FKFeatures.cpp.

float64_t deriv_a ( float64_t  a,
int32_t  dimension = -1 
) [protected]

deriv a

Parameters:
a a
dimension dimension

Definition at line 43 of file FKFeatures.cpp.

float64_t get_a (  ) 

get weight a

Returns:
weight a

Definition at line 80 of file FKFeatures.h.

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

Reimplemented from CSimpleFeatures< float64_t >.

Definition at line 105 of file FKFeatures.h.

float64_t get_weight_a (  ) 

get weight_a

Returns:
weight_a

Definition at line 102 of file FKFeatures.h.

void set_a ( float64_t  a  ) 

set weight a

Parameters:
a weight a

Definition at line 71 of file FKFeatures.h.

float64_t * set_feature_matrix (  )  [virtual]

set feature matrix

Returns:
something floaty

Definition at line 214 of file FKFeatures.cpp.

void set_models ( CHMM p,
CHMM n 
)

set HMMs

Parameters:
p positive HMM
n negative HMM

Definition at line 128 of file FKFeatures.cpp.

float64_t set_opt_a ( float64_t  a = -1  ) 

set opt a

Parameters:
a a
Returns:
something floaty

Definition at line 91 of file FKFeatures.cpp.


Member Data Documentation

CHMM* neg [protected]

negative HMM

Definition at line 140 of file FKFeatures.h.

float64_t* neg_prob [protected]

negative prob

Definition at line 144 of file FKFeatures.h.

CHMM* pos [protected]

positive HMM

Definition at line 138 of file FKFeatures.h.

float64_t* pos_prob [protected]

positive prob

Definition at line 142 of file FKFeatures.h.

float64_t weight_a [protected]

weight a

Definition at line 146 of file FKFeatures.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