Sparse Spatial Sample String Kernel by Pavel Kuksa <pkuksa@cs.rutgers.edu> and Vladimir Pavlovic <vladimir@cs.rutgers.edu>
Definition at line 34 of file SparseSpatialSampleStringKernel.h.

Public Member Functions | |
| CSparseSpatialSampleStringKernel () | |
| CSparseSpatialSampleStringKernel (CStringFeatures< char > *l, CStringFeatures< char > *r) | |
| virtual | ~CSparseSpatialSampleStringKernel () |
| virtual bool | init (CFeatures *l, CFeatures *r) |
| virtual void | cleanup () |
| virtual EKernelType | get_kernel_type () |
| void | set_d (int32_t max_distance) |
| int32_t | get_d () |
| void | set_t (int32_t sequence_length) |
| int32_t | get_t () |
| virtual const char * | get_name () const |
Protected Member Functions | |
| virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
| SSKFeatures * | extractTriple (int **S, int *len, int nStr, int d1, int d2) |
| SSKFeatures * | extractDouble (int **S, int *len, int nStr, int d1) |
| void | compute_double (int32_t idx_a, int32_t idx_b) |
| void | compute_triple (int32_t idx_a, int32_t idx_b) |
| int * | cntsrtna (int *sx, int k, int r, int na) |
| void | countAndUpdate (int *outK, int *sx, int *g, int k, int r, int nStr) |
Protected Attributes | |
| int32_t | t |
| int32_t | d |
| bool | isVerbose |
constructor
Definition at line 23 of file SparseSpatialSampleStringKernel.cpp.
| CSparseSpatialSampleStringKernel | ( | CStringFeatures< char > * | l, | |
| CStringFeatures< char > * | r | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side |
Definition at line 28 of file SparseSpatialSampleStringKernel.cpp.
| ~CSparseSpatialSampleStringKernel | ( | ) | [virtual] |
Definition at line 45 of file SparseSpatialSampleStringKernel.cpp.
| void cleanup | ( | ) | [virtual] |
clean up kernel
Reimplemented from CKernel.
Definition at line 40 of file SparseSpatialSampleStringKernel.cpp.
| int * cntsrtna | ( | int * | sx, | |
| int | k, | |||
| int | r, | |||
| int | na | |||
| ) | [protected] |
makes CNTSRTNA
| sx | ||
| k | ||
| r | ||
| na |
Definition at line 335 of file SparseSpatialSampleStringKernel.cpp.
| 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 370 of file SparseSpatialSampleStringKernel.cpp.
| void compute_double | ( | int32_t | idx_a, | |
| int32_t | idx_b | |||
| ) | [protected] |
compute double
| idx_a | ||
| idx_b |
Definition at line 125 of file SparseSpatialSampleStringKernel.cpp.
| void compute_triple | ( | int32_t | idx_a, | |
| int32_t | idx_b | |||
| ) | [protected] |
compute triple
| idx_a | ||
| idx_b |
Definition at line 190 of file SparseSpatialSampleStringKernel.cpp.
| void countAndUpdate | ( | int * | outK, | |
| int * | sx, | |||
| int * | g, | |||
| int | k, | |||
| int | r, | |||
| int | nStr | |||
| ) | [protected] |
count and update
| outK | ||
| sx | ||
| g | ||
| k | ||
| r | ||
| nStr |
Definition at line 266 of file SparseSpatialSampleStringKernel.cpp.
| SSKFeatures * extractDouble | ( | int ** | S, | |
| int * | len, | |||
| int | nStr, | |||
| int | d1 | |||
| ) | [protected] |
extract double
| S | ||
| len | ||
| nStr | ||
| d1 |
Definition at line 87 of file SparseSpatialSampleStringKernel.cpp.
| SSKFeatures * extractTriple | ( | int ** | S, | |
| int * | len, | |||
| int | nStr, | |||
| int | d1, | |||
| int | d2 | |||
| ) | [protected] |
extract triple
| S | ||
| len | ||
| nStr | ||
| d1 | ||
| d2 |
Definition at line 49 of file SparseSpatialSampleStringKernel.cpp.
| int32_t get_d | ( | ) |
get d
Definition at line 80 of file SparseSpatialSampleStringKernel.h.
| virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CStringKernel< char >.
Definition at line 65 of file SparseSpatialSampleStringKernel.h.
| virtual const char* get_name | ( | ) | const [virtual] |
return the kernel's name
Reimplemented from CStringKernel< char >.
Definition at line 104 of file SparseSpatialSampleStringKernel.h.
| int32_t get_t | ( | ) |
get t
Definition at line 95 of file SparseSpatialSampleStringKernel.h.
initialize kernel
| l | features of left-hand side | |
| r | features of right-hand side |
Reimplemented from CStringKernel< char >.
Definition at line 34 of file SparseSpatialSampleStringKernel.cpp.
| void set_d | ( | int32_t | max_distance | ) |
| void set_t | ( | int32_t | sequence_length | ) |
int32_t d [protected] |
parameter d of the SSSK denotes maximum allowed distance between words in the sequence
Definition at line 166 of file SparseSpatialSampleStringKernel.h.
bool isVerbose [protected] |
is verbose?
Definition at line 169 of file SparseSpatialSampleStringKernel.h.
int32_t t [protected] |
parameter t of the SSSK denotes how many words are considered in the sequence (valid are only 2 or 3)
Definition at line 162 of file SparseSpatialSampleStringKernel.h.