Definition at line 29 of file SpectrumRBFKernel.h.
Public Member Functions | |
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 |
T_STRING< 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 |
int | target_letter_0 |
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 59 of file SpectrumRBFKernel.cpp.
~CSpectrumRBFKernel | ( | ) | [virtual] |
Definition at line 71 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 323 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 345 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 CKernel.
Definition at line 75 of file SpectrumRBFKernel.h.
virtual const char* get_name | ( | ) | const [virtual] |
return the kernel's name
Implements CSGObject.
Definition at line 81 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 272 of file SpectrumRBFKernel.cpp.
void read_profiles_and_sequences | ( | ) | [protected] |
Definition at line 84 of file SpectrumRBFKernel.cpp.
void remove_lhs | ( | ) | [protected, virtual] |
remove lhs from kernel
Reimplemented from CKernel.
Definition at line 78 of file SpectrumRBFKernel.cpp.
bool set_AA_matrix | ( | float64_t * | AA_matrix_ | ) |
Definition at line 368 of file SpectrumRBFKernel.cpp.
bool set_degree | ( | int32_t | deg | ) |
set degree
deg | new degree |
Definition at line 88 of file SpectrumRBFKernel.h.
maximum mismatch 128x128 scalar product matrix
Definition at line 127 of file SpectrumRBFKernel.h.
alphabet of features
Definition at line 122 of file SpectrumRBFKernel.h.
int32_t degree [protected] |
degree
Definition at line 124 of file SpectrumRBFKernel.h.
bool initialized [protected] |
if kernel is initialized
Definition at line 142 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 146 of file SpectrumRBFKernel.h.
int32_t max_mismatch [protected] |
Definition at line 144 of file SpectrumRBFKernel.h.
int32_t max_sequence_length [protected] |
Definition at line 139 of file SpectrumRBFKernel.h.
int32_t nof_sequences [protected] |
Definition at line 138 of file SpectrumRBFKernel.h.
Definition at line 134 of file SpectrumRBFKernel.h.
std::vector<std::string> sequence_labels [protected] |
Definition at line 135 of file SpectrumRBFKernel.h.
T_STRING<char>* sequences [protected] |
Definition at line 136 of file SpectrumRBFKernel.h.
CStringFeatures<char>* string_features [protected] |
Definition at line 137 of file SpectrumRBFKernel.h.
int target_letter_0 [protected] |
Definition at line 147 of file SpectrumRBFKernel.h.
width of Gaussian
Definition at line 129 of file SpectrumRBFKernel.h.