Definition at line 30 of file SpectrumRBFKernel.h.
Public Member Functions | |
CSpectrumRBFKernel (void) | |
CSpectrumRBFKernel (int32_t size, float64_t *AA_matrix, int32_t degree, float64_t width) | |
CSpectrumRBFKernel (CStringFeatures< char > *l, CStringFeatures< char > *r, int32_t size, float64_t *AA_matrix, int32_t degree, float64_t width) | |
virtual | ~CSpectrumRBFKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual void | cleanup () |
int32_t | get_degree () const |
virtual EKernelType | get_kernel_type () |
virtual const char * | get_name () const |
bool | set_degree (int32_t deg) |
int32_t | get_degree () |
bool | set_AA_matrix (float64_t *AA_matrix_) |
Protected Member Functions | |
float64_t | AA_helper (const char *path, const int degree, const char *joint_seq, unsigned int index) |
void | read_profiles_and_sequences () |
float64_t | compute (int32_t idx_a, int32_t idx_b) |
virtual void | remove_lhs () |
Protected Attributes | |
CAlphabet * | alphabet |
int32_t | degree |
float64_t * | AA_matrix |
float64_t | width |
std::vector< std::vector < float64_t > > | profiles |
std::vector< std::string > | sequence_labels |
TString< char > * | sequences |
CStringFeatures< char > * | string_features |
int32_t | nof_sequences |
int32_t | max_sequence_length |
bool | initialized |
int32_t | max_mismatch |
CArray2< float64_t > | kernel_matrix |
int32_t | target_letter_0 |
CSpectrumRBFKernel | ( | void | ) |
default constructor
Definition at line 39 of file SpectrumRBFKernel.cpp.
CSpectrumRBFKernel | ( | int32_t | size, | |
float64_t * | AA_matrix, | |||
int32_t | degree, | |||
float64_t | width | |||
) |
CSpectrumRBFKernel | ( | CStringFeatures< char > * | l, | |
CStringFeatures< char > * | r, | |||
int32_t | size, | |||
float64_t * | AA_matrix, | |||
int32_t | degree, | |||
float64_t | width | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
degree | degree |
Definition at line 79 of file SpectrumRBFKernel.cpp.
~CSpectrumRBFKernel | ( | ) | [virtual] |
Definition at line 91 of file SpectrumRBFKernel.cpp.
float64_t AA_helper | ( | const char * | path, | |
const int | degree, | |||
const char * | joint_seq, | |||
unsigned int | index | |||
) | [protected] |
Definition at line 343 of file SpectrumRBFKernel.cpp.
void cleanup | ( | ) | [virtual] |
float64_t compute | ( | int32_t | idx_a, | |
int32_t | idx_b | |||
) | [protected, virtual] |
compute kernel function for features a and b idx_{a,b} denote the index of the feature vectors in the corresponding feature object
idx_a | index a | |
idx_b | index b |
Implements CKernel.
Definition at line 365 of file SpectrumRBFKernel.cpp.
int32_t get_degree | ( | ) | const |
int32_t get_degree | ( | ) |
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CStringKernel< char >.
Definition at line 78 of file SpectrumRBFKernel.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
return the kernel's name
Reimplemented from CStringKernel< char >.
Definition at line 84 of file SpectrumRBFKernel.h.
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CStringKernel< char >.
Definition at line 292 of file SpectrumRBFKernel.cpp.
void read_profiles_and_sequences | ( | ) | [protected] |
Definition at line 104 of file SpectrumRBFKernel.cpp.
void remove_lhs | ( | ) | [protected, virtual] |
remove lhs from kernel
Reimplemented from CKernel.
Definition at line 98 of file SpectrumRBFKernel.cpp.
bool set_AA_matrix | ( | float64_t * | AA_matrix_ | ) |
Definition at line 388 of file SpectrumRBFKernel.cpp.
bool set_degree | ( | int32_t | deg | ) |
set degree
deg | new degree |
Definition at line 91 of file SpectrumRBFKernel.h.
maximum mismatch 128x128 scalar product matrix
Definition at line 130 of file SpectrumRBFKernel.h.
alphabet of features
Definition at line 125 of file SpectrumRBFKernel.h.
int32_t degree [protected] |
degree
Definition at line 127 of file SpectrumRBFKernel.h.
bool initialized [protected] |
if kernel is initialized
Definition at line 145 of file SpectrumRBFKernel.h.
CArray2<float64_t> kernel_matrix [protected] |
this *COULD* store the whole kernel matrix usually not applicable / necessary to compute the whole matrix
Reimplemented from CKernel.
Definition at line 149 of file SpectrumRBFKernel.h.
int32_t max_mismatch [protected] |
Definition at line 147 of file SpectrumRBFKernel.h.
int32_t max_sequence_length [protected] |
Definition at line 142 of file SpectrumRBFKernel.h.
int32_t nof_sequences [protected] |
Definition at line 141 of file SpectrumRBFKernel.h.
Definition at line 137 of file SpectrumRBFKernel.h.
std::vector<std::string> sequence_labels [protected] |
Definition at line 138 of file SpectrumRBFKernel.h.
Definition at line 139 of file SpectrumRBFKernel.h.
CStringFeatures<char>* string_features [protected] |
Definition at line 140 of file SpectrumRBFKernel.h.
int32_t target_letter_0 [protected] |
Definition at line 150 of file SpectrumRBFKernel.h.
width of Gaussian
Definition at line 132 of file SpectrumRBFKernel.h.