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 35 of file FKFeatures.h.

Inheritance diagram for CFKFeatures:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 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::CFKFeatures ( int32_t  size,
CHMM p,
CHMM n 
)

constructor

Parameters:
size cache size
p positive HMM
n negative HMM

Definition at line 16 of file FKFeatures.cpp.

CFKFeatures::CFKFeatures ( const CFKFeatures orig  ) 

copy constructor

Definition at line 25 of file FKFeatures.cpp.

CFKFeatures::~CFKFeatures (  )  [virtual]

Definition at line 30 of file FKFeatures.cpp.


Member Function Documentation

void CFKFeatures::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 161 of file FKFeatures.cpp.

float64_t * CFKFeatures::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 141 of file FKFeatures.cpp.

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

deriv a

Parameters:
a a
dimension dimension

Definition at line 36 of file FKFeatures.cpp.

float64_t CFKFeatures::get_a (  ) 

get weight a

Returns:
weight a

Definition at line 71 of file FKFeatures.h.

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

Reimplemented from CSimpleFeatures< float64_t >.

Definition at line 96 of file FKFeatures.h.

float64_t CFKFeatures::get_weight_a (  ) 

get weight_a

Returns:
weight_a

Definition at line 93 of file FKFeatures.h.

void CFKFeatures::set_a ( float64_t  a  ) 

set weight a

Parameters:
a weight a

Definition at line 62 of file FKFeatures.h.

float64_t * CFKFeatures::set_feature_matrix (  )  [virtual]

set feature matrix

Returns:
something floaty

Definition at line 207 of file FKFeatures.cpp.

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

set HMMs

Parameters:
p positive HMM
n negative HMM

Definition at line 121 of file FKFeatures.cpp.

float64_t CFKFeatures::set_opt_a ( float64_t  a = -1  ) 

set opt a

Parameters:
a a
Returns:
something floaty

Definition at line 84 of file FKFeatures.cpp.


Member Data Documentation

CHMM* CFKFeatures::neg [protected]

negative HMM

Definition at line 128 of file FKFeatures.h.

negative prob

Definition at line 132 of file FKFeatures.h.

CHMM* CFKFeatures::pos [protected]

positive HMM

Definition at line 126 of file FKFeatures.h.

positive prob

Definition at line 130 of file FKFeatures.h.

weight a

Definition at line 134 of file FKFeatures.h.


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

SHOGUN Machine Learning Toolbox - Documentation