The Weighted Degree Position String kernel (Weighted Degree kernel with shifts).
The WD-shift kernel of order d compares two sequences and
of length L by summing all contributions of k-mer matches of lengths
, weighted by coefficients
allowing for a positional tolerance of up to shift s.
It is formally defined as
where are the weighting coefficients of the j-mers,
is a weighting over the position in the sequence,
is the weight assigned to shifts (in either direction) of extent s, and S(l) determines the shift range at position l.
Definition at line 45 of file WeightedDegreePositionStringKernel.h.
Public Member Functions | |
CWeightedDegreePositionStringKernel (int32_t size, int32_t degree, int32_t max_mismatch=0, int32_t mkl_stepsize=1) | |
CWeightedDegreePositionStringKernel (int32_t size, float64_t *weights, int32_t degree, int32_t max_mismatch, int32_t *shift, int32_t shift_len, int32_t mkl_stepsize=1) | |
CWeightedDegreePositionStringKernel (CStringFeatures< char > *l, CStringFeatures< char > *r, int32_t degree) | |
virtual | ~CWeightedDegreePositionStringKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual void | cleanup () |
bool | load_init (FILE *src) |
bool | save_init (FILE *dest) |
virtual EKernelType | get_kernel_type () |
virtual const char * | get_name () const |
virtual bool | init_optimization (int32_t p_count, int32_t *IDX, float64_t *alphas) |
virtual bool | init_optimization (int32_t count, int32_t *IDX, float64_t *alphas, int32_t tree_num, int32_t upto_tree=-1) |
virtual bool | delete_optimization () |
virtual float64_t | compute_optimized (int32_t idx) |
virtual void | compute_batch (int32_t num_vec, int32_t *vec_idx, float64_t *target, int32_t num_suppvec, int32_t *IDX, float64_t *alphas, float64_t factor=1.0) |
virtual void | clear_normal () |
virtual void | add_to_normal (int32_t idx, float64_t weight) |
virtual int32_t | get_num_subkernels () |
void | compute_by_subkernel (int32_t idx, float64_t *subkernel_contrib) |
const float64_t * | get_subkernel_weights (int32_t &num_weights) |
void | set_subkernel_weights (float64_t *weights2, int32_t num_weights2) |
float64_t * | compute_abs_weights (int32_t &len) |
bool | is_tree_initialized () |
int32_t | get_max_mismatch () |
int32_t | get_degree () |
float64_t * | get_degree_weights (int32_t &d, int32_t &len) |
float64_t * | get_weights (int32_t &num_weights) |
float64_t * | get_position_weights (int32_t &len) |
bool | set_shifts (int32_t *shifts, int32_t len) |
virtual bool | set_weights (float64_t *weights, int32_t d, int32_t len=0) |
virtual bool | set_wd_weights () |
virtual bool | set_position_weights (float64_t *pws, int32_t len=0) |
bool | set_position_weights_lhs (float64_t *pws, int32_t len, int32_t num) |
bool | set_position_weights_rhs (float64_t *pws, int32_t len, int32_t num) |
bool | init_block_weights () |
bool | init_block_weights_from_wd () |
bool | init_block_weights_from_wd_external () |
bool | init_block_weights_const () |
bool | init_block_weights_linear () |
bool | init_block_weights_sqpoly () |
bool | init_block_weights_cubicpoly () |
bool | init_block_weights_exp () |
bool | init_block_weights_log () |
bool | init_block_weights_external () |
bool | delete_position_weights () |
bool | delete_position_weights_lhs () |
bool | delete_position_weights_rhs () |
virtual float64_t | compute_by_tree (int32_t idx) |
virtual void | compute_by_tree (int32_t idx, float64_t *LevelContrib) |
float64_t * | compute_scoring (int32_t max_degree, int32_t &num_feat, int32_t &num_sym, float64_t *target, int32_t num_suppvec, int32_t *IDX, float64_t *weights) |
char * | compute_consensus (int32_t &num_feat, int32_t num_suppvec, int32_t *IDX, float64_t *alphas) |
float64_t * | extract_w (int32_t max_degree, int32_t &num_feat, int32_t &num_sym, float64_t *w_result, int32_t num_suppvec, int32_t *IDX, float64_t *alphas) |
float64_t * | compute_POIM (int32_t max_degree, int32_t &num_feat, int32_t &num_sym, float64_t *poim_result, int32_t num_suppvec, int32_t *IDX, float64_t *alphas, float64_t *distrib) |
void | prepare_POIM2 (float64_t *distrib, int32_t num_sym, int32_t num_feat) |
void | compute_POIM2 (int32_t max_degree, CSVM *svm) |
void | get_POIM2 (float64_t **poim, int32_t *result_len) |
void | cleanup_POIM2 () |
cleanup POIM2 | |
Static Public Member Functions | |
static void * | compute_batch_helper (void *p) |
Protected Member Functions | |
void | create_empty_tries () |
virtual void | add_example_to_tree (int32_t idx, float64_t weight) |
void | add_example_to_single_tree (int32_t idx, float64_t weight, int32_t tree_num) |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
float64_t | compute_with_mismatch (char *avec, int32_t alen, char *bvec, int32_t blen) |
float64_t | compute_without_mismatch (char *avec, int32_t alen, char *bvec, int32_t blen) |
float64_t | compute_without_mismatch_matrix (char *avec, int32_t alen, char *bvec, int32_t blen) |
float64_t | compute_without_mismatch_position_weights (char *avec, float64_t *posweights_lhs, int32_t alen, char *bvec, float64_t *posweights_rhs, int32_t blen) |
virtual void | remove_lhs () |
Protected Attributes | |
float64_t * | weights |
float64_t * | position_weights |
float64_t * | position_weights_lhs |
float64_t * | position_weights_rhs |
bool * | position_mask |
float64_t * | weights_buffer |
int32_t | mkl_stepsize |
int32_t | degree |
int32_t | length |
int32_t | max_mismatch |
int32_t | seq_length |
int32_t * | shift |
int32_t | shift_len |
int32_t | max_shift |
bool | block_computation |
int32_t | num_block_weights_external |
float64_t * | block_weights_external |
float64_t * | block_weights |
EWDKernType | type |
int32_t | which_degree |
CTrie< DNATrie > | tries |
CTrie< POIMTrie > | poim_tries |
bool | tree_initialized |
bool | use_poim_tries |
float64_t * | m_poim_distrib |
float64_t * | m_poim |
int32_t | m_poim_num_sym |
int32_t | m_poim_num_feat |
int32_t | m_poim_result_len |
CAlphabet * | alphabet |
CWeightedDegreePositionStringKernel::CWeightedDegreePositionStringKernel | ( | int32_t | size, | |
int32_t | degree, | |||
int32_t | max_mismatch = 0 , |
|||
int32_t | mkl_stepsize = 1 | |||
) |
constructor
size | cache size | |
degree | degree | |
max_mismatch | maximum mismatch | |
mkl_stepsize | MKL stepsize |
Definition at line 50 of file WeightedDegreePositionStringKernel.cpp.
CWeightedDegreePositionStringKernel::CWeightedDegreePositionStringKernel | ( | int32_t | size, | |
float64_t * | weights, | |||
int32_t | degree, | |||
int32_t | max_mismatch, | |||
int32_t * | shift, | |||
int32_t | shift_len, | |||
int32_t | mkl_stepsize = 1 | |||
) |
constructor
size | cache size | |
weights | weights | |
degree | degree | |
max_mismatch | maximum mismatch | |
shift | position shifts | |
shift_len | number of shifts | |
mkl_stepsize | MKL stepsize |
Definition at line 69 of file WeightedDegreePositionStringKernel.cpp.
CWeightedDegreePositionStringKernel::CWeightedDegreePositionStringKernel | ( | CStringFeatures< char > * | l, | |
CStringFeatures< char > * | r, | |||
int32_t | degree | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
degree | degree |
Definition at line 93 of file WeightedDegreePositionStringKernel.cpp.
CWeightedDegreePositionStringKernel::~CWeightedDegreePositionStringKernel | ( | ) | [virtual] |
Definition at line 114 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::add_example_to_single_tree | ( | int32_t | idx, | |
float64_t | weight, | |||
int32_t | tree_num | |||
) | [protected] |
add example to single tree
idx | index | |
weight | weight | |
tree_num | which tree |
Definition at line 702 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::add_example_to_tree | ( | int32_t | idx, | |
float64_t | weight | |||
) | [protected, virtual] |
add example to tree
idx | index | |
weight | weight |
Definition at line 650 of file WeightedDegreePositionStringKernel.cpp.
virtual void CWeightedDegreePositionStringKernel::add_to_normal | ( | int32_t | idx, | |
float64_t | weight | |||
) | [virtual] |
add to normal
idx | where to add | |
weight | what to add |
Reimplemented from CKernel.
Definition at line 219 of file WeightedDegreePositionStringKernel.h.
void CWeightedDegreePositionStringKernel::cleanup | ( | ) | [virtual] |
clean up kernel
Reimplemented from CKernel.
Definition at line 220 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::cleanup_POIM2 | ( | ) |
cleanup POIM2
Definition at line 1941 of file WeightedDegreePositionStringKernel.cpp.
virtual void CWeightedDegreePositionStringKernel::clear_normal | ( | ) | [virtual] |
clear normal subkernel functionality
Reimplemented from CKernel.
Definition at line 193 of file WeightedDegreePositionStringKernel.h.
float64_t CWeightedDegreePositionStringKernel::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 611 of file WeightedDegreePositionStringKernel.cpp.
float64_t * CWeightedDegreePositionStringKernel::compute_abs_weights | ( | int32_t & | len | ) |
compute abs weights
len | len |
Definition at line 829 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::compute_batch | ( | int32_t | num_vec, | |
int32_t * | vec_idx, | |||
float64_t * | target, | |||
int32_t | num_suppvec, | |||
int32_t * | IDX, | |||
float64_t * | alphas, | |||
float64_t | factor = 1.0 | |||
) | [virtual] |
compute batch
num_vec | number of vectors | |
vec_idx | vector index | |
target | target | |
num_suppvec | number of support vectors | |
IDX | IDX | |
alphas | alphas | |
factor | factor |
Reimplemented from CKernel.
Definition at line 1303 of file WeightedDegreePositionStringKernel.cpp.
void * CWeightedDegreePositionStringKernel::compute_batch_helper | ( | void * | p | ) | [static] |
helper for compute batch
p | thread parameter |
Definition at line 1247 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::compute_by_subkernel | ( | int32_t | idx, | |
float64_t * | subkernel_contrib | |||
) | [virtual] |
compute by subkernel
idx | index | |
subkernel_contrib | subkernel contribution |
Reimplemented from CKernel.
Definition at line 243 of file WeightedDegreePositionStringKernel.h.
void CWeightedDegreePositionStringKernel::compute_by_tree | ( | int32_t | idx, | |
float64_t * | LevelContrib | |||
) | [virtual] |
compute by tree
idx | index | |
LevelContrib | level contribution |
Definition at line 789 of file WeightedDegreePositionStringKernel.cpp.
float64_t CWeightedDegreePositionStringKernel::compute_by_tree | ( | int32_t | idx | ) | [virtual] |
compute by tree
idx | index |
Definition at line 753 of file WeightedDegreePositionStringKernel.cpp.
char * CWeightedDegreePositionStringKernel::compute_consensus | ( | int32_t & | num_feat, | |
int32_t | num_suppvec, | |||
int32_t * | IDX, | |||
float64_t * | alphas | |||
) |
compute consensus string
num_feat | number of features | |
num_suppvec | number of support vectors | |
IDX | IDX | |
alphas | alphas |
Definition at line 1569 of file WeightedDegreePositionStringKernel.cpp.
virtual float64_t CWeightedDegreePositionStringKernel::compute_optimized | ( | int32_t | idx | ) | [virtual] |
compute optimized
idx | index to compute |
Reimplemented from CKernel.
Definition at line 161 of file WeightedDegreePositionStringKernel.h.
float64_t * CWeightedDegreePositionStringKernel::compute_POIM | ( | int32_t | max_degree, | |
int32_t & | num_feat, | |||
int32_t & | num_sym, | |||
float64_t * | poim_result, | |||
int32_t | num_suppvec, | |||
int32_t * | IDX, | |||
float64_t * | alphas, | |||
float64_t * | distrib | |||
) |
compute POIM
max_degree | maximum degree | |
num_feat | number of features | |
num_sym | number of symbols | |
poim_result | poim | |
num_suppvec | number of support vectors | |
IDX | IDX | |
alphas | alphas | |
distrib | distribution |
Definition at line 1749 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::compute_POIM2 | ( | int32_t | max_degree, | |
CSVM * | svm | |||
) |
compute POIM2
max_degree | maximum degree | |
svm | SVM |
Definition at line 1897 of file WeightedDegreePositionStringKernel.cpp.
float64_t * CWeightedDegreePositionStringKernel::compute_scoring | ( | int32_t | max_degree, | |
int32_t & | num_feat, | |||
int32_t & | num_sym, | |||
float64_t * | target, | |||
int32_t | num_suppvec, | |||
int32_t * | IDX, | |||
float64_t * | weights | |||
) |
compute positional scoring function, which assigns a weight per position, per symbol in the sequence
max_degree | maximum degree | |
num_feat | number of features | |
num_sym | number of symbols | |
target | target | |
num_suppvec | number of support vectors | |
IDX | IDX | |
weights | weights |
Definition at line 1413 of file WeightedDegreePositionStringKernel.cpp.
float64_t CWeightedDegreePositionStringKernel::compute_with_mismatch | ( | char * | avec, | |
int32_t | alen, | |||
char * | bvec, | |||
int32_t | blen | |||
) | [protected] |
compute with mismatch
avec | vector a | |
alen | length of vector a | |
bvec | vector b | |
blen | length of vector b |
Definition at line 321 of file WeightedDegreePositionStringKernel.cpp.
float64_t CWeightedDegreePositionStringKernel::compute_without_mismatch | ( | char * | avec, | |
int32_t | alen, | |||
char * | bvec, | |||
int32_t | blen | |||
) | [protected] |
compute without mismatch
avec | vector a | |
alen | length of vector a | |
bvec | vector b | |
blen | length of vector b |
Definition at line 401 of file WeightedDegreePositionStringKernel.cpp.
float64_t CWeightedDegreePositionStringKernel::compute_without_mismatch_matrix | ( | char * | avec, | |
int32_t | alen, | |||
char * | bvec, | |||
int32_t | blen | |||
) | [protected] |
compute without mismatch matrix
avec | vector a | |
alen | length of vector a | |
bvec | vector b | |
blen | length of vector b |
Definition at line 466 of file WeightedDegreePositionStringKernel.cpp.
float64_t CWeightedDegreePositionStringKernel::compute_without_mismatch_position_weights | ( | char * | avec, | |
float64_t * | posweights_lhs, | |||
int32_t | alen, | |||
char * | bvec, | |||
float64_t * | posweights_rhs, | |||
int32_t | blen | |||
) | [protected] |
compute without mismatch position weights
avec | vector a | |
posweights_lhs | position weights left-hand side | |
alen | length of vector a | |
bvec | vector b | |
posweights_rhs | position weights right-hand side | |
blen | length of vector b |
Definition at line 530 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::create_empty_tries | ( | ) | [protected] |
create emtpy tries
Definition at line 152 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::delete_optimization | ( | ) | [virtual] |
delete optimization
Reimplemented from CKernel.
Definition at line 296 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::delete_position_weights | ( | ) |
delete position weights
Definition at line 491 of file WeightedDegreePositionStringKernel.h.
bool CWeightedDegreePositionStringKernel::delete_position_weights_lhs | ( | ) |
delete position weights left-hand side
Definition at line 502 of file WeightedDegreePositionStringKernel.h.
bool CWeightedDegreePositionStringKernel::delete_position_weights_rhs | ( | ) |
delete position weights right-hand side
Definition at line 513 of file WeightedDegreePositionStringKernel.h.
float64_t * CWeightedDegreePositionStringKernel::extract_w | ( | int32_t | max_degree, | |
int32_t & | num_feat, | |||
int32_t & | num_sym, | |||
float64_t * | w_result, | |||
int32_t | num_suppvec, | |||
int32_t * | IDX, | |||
float64_t * | alphas | |||
) |
extract w
max_degree | maximum degree | |
num_feat | number of features | |
num_sym | number of symbols | |
w_result | w | |
num_suppvec | number of support vectors | |
IDX | IDX | |
alphas | alphas |
Definition at line 1686 of file WeightedDegreePositionStringKernel.cpp.
int32_t CWeightedDegreePositionStringKernel::get_degree | ( | ) |
float64_t* CWeightedDegreePositionStringKernel::get_degree_weights | ( | int32_t & | d, | |
int32_t & | len | |||
) |
get degree weights
d | degree weights will be stored here | |
len | number of degree weights will be stored here |
Definition at line 343 of file WeightedDegreePositionStringKernel.h.
virtual EKernelType CWeightedDegreePositionStringKernel::get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CKernel.
Definition at line 114 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::get_max_mismatch | ( | ) |
get maximum mismatch
Definition at line 330 of file WeightedDegreePositionStringKernel.h.
virtual const char* CWeightedDegreePositionStringKernel::get_name | ( | ) | const [virtual] |
return the kernel's name
Implements CSGObject.
Definition at line 120 of file WeightedDegreePositionStringKernel.h.
virtual int32_t CWeightedDegreePositionStringKernel::get_num_subkernels | ( | ) | [virtual] |
get number of subkernels
Reimplemented from CKernel.
Definition at line 229 of file WeightedDegreePositionStringKernel.h.
void CWeightedDegreePositionStringKernel::get_POIM2 | ( | float64_t ** | poim, | |
int32_t * | result_len | |||
) |
get POIM2
poim | POIMs (returned) | |
result_len | (returned) |
Definition at line 1932 of file WeightedDegreePositionStringKernel.cpp.
float64_t* CWeightedDegreePositionStringKernel::get_position_weights | ( | int32_t & | len | ) |
get position weights
len | number of position weights will be stored here |
Definition at line 374 of file WeightedDegreePositionStringKernel.h.
const float64_t* CWeightedDegreePositionStringKernel::get_subkernel_weights | ( | int32_t & | num_weights | ) | [virtual] |
get subkernel weights
num_weights | number of weights will be stored here |
Reimplemented from CKernel.
Definition at line 260 of file WeightedDegreePositionStringKernel.h.
float64_t* CWeightedDegreePositionStringKernel::get_weights | ( | int32_t & | num_weights | ) |
get weights
num_weights | number of weights will be stored here |
Definition at line 355 of file WeightedDegreePositionStringKernel.h.
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CStringKernel< char >.
Definition at line 171 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights | ( | ) |
initialize block weights
Definition at line 1218 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights_const | ( | ) |
initialize block weights constant
Definition at line 1103 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights_cubicpoly | ( | ) |
initialize block weights cubic polynomial
Definition at line 1148 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights_exp | ( | ) |
initialize block weights exponential
Definition at line 1165 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights_external | ( | ) |
initialize block weights external
Definition at line 1199 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights_from_wd | ( | ) |
initialize block weights from weighted degree
Definition at line 1055 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights_from_wd_external | ( | ) |
initialize block weights from external weighted degree
Definition at line 1075 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights_linear | ( | ) |
initialize block weights linear
Definition at line 1117 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights_log | ( | ) |
initialize block weights logarithmic
Definition at line 1182 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_block_weights_sqpoly | ( | ) |
initialize block weights squared polynomial
Definition at line 1131 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::init_optimization | ( | int32_t | count, | |
int32_t * | IDX, | |||
float64_t * | alphas, | |||
int32_t | tree_num, | |||
int32_t | upto_tree = -1 | |||
) | [virtual] |
initialize optimization do initialization for tree_num up to upto_tree, use tree_num=-1 to construct all trees
count | count | |
IDX | IDX | |
alphas | alphas | |
tree_num | which tree | |
upto_tree | up to this tree |
Definition at line 250 of file WeightedDegreePositionStringKernel.cpp.
virtual bool CWeightedDegreePositionStringKernel::init_optimization | ( | int32_t | p_count, | |
int32_t * | IDX, | |||
float64_t * | alphas | |||
) | [virtual] |
initialize optimization
p_count | count | |
IDX | index | |
alphas | alphas |
Reimplemented from CKernel.
Definition at line 129 of file WeightedDegreePositionStringKernel.h.
bool CWeightedDegreePositionStringKernel::is_tree_initialized | ( | ) |
check if tree is initialized
Definition at line 324 of file WeightedDegreePositionStringKernel.h.
bool CWeightedDegreePositionStringKernel::load_init | ( | FILE * | src | ) | [virtual] |
load kernel init_data
src | file to load from |
Implements CKernel.
Definition at line 240 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::prepare_POIM2 | ( | float64_t * | distrib, | |
int32_t | num_sym, | |||
int32_t | num_feat | |||
) |
prepare POIM2
num_feat | number of features | |
num_sym | number of symbols | |
distrib | distribution |
Definition at line 1885 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::remove_lhs | ( | ) | [protected, virtual] |
remove lhs from kernel
Reimplemented from CKernel.
Definition at line 141 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::save_init | ( | FILE * | dest | ) | [virtual] |
save kernel init_data
dest | file to save to |
Implements CKernel.
Definition at line 245 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::set_position_weights | ( | float64_t * | pws, | |
int32_t | len = 0 | |||
) | [virtual] |
set position weights
pws | new position weights | |
len | number of position weights |
Definition at line 921 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::set_position_weights_lhs | ( | float64_t * | pws, | |
int32_t | len, | |||
int32_t | num | |||
) |
set position weights for left-hand side
pws | new position weights | |
len | len | |
num | num |
Definition at line 955 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::set_position_weights_rhs | ( | float64_t * | pws, | |
int32_t | len, | |||
int32_t | num | |||
) |
set position weights for right-hand side
pws | new position weights | |
len | len | |
num | num |
Definition at line 1001 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::set_shifts | ( | int32_t * | shifts, | |
int32_t | len | |||
) |
set shifts
shifts | new shifts | |
len | number of shifts |
Definition at line 835 of file WeightedDegreePositionStringKernel.cpp.
void CWeightedDegreePositionStringKernel::set_subkernel_weights | ( | float64_t * | weights2, | |
int32_t | num_weights2 | |||
) | [virtual] |
set subkernel weights
weights2 | weights | |
num_weights2 | number of weights |
Reimplemented from CKernel.
Definition at line 282 of file WeightedDegreePositionStringKernel.h.
bool CWeightedDegreePositionStringKernel::set_wd_weights | ( | ) | [virtual] |
set wd weights
Definition at line 860 of file WeightedDegreePositionStringKernel.cpp.
bool CWeightedDegreePositionStringKernel::set_weights | ( | float64_t * | weights, | |
int32_t | d, | |||
int32_t | len = 0 | |||
) | [virtual] |
set weights
weights | new weights | |
d | degree | |
len | number of weights |
Definition at line 898 of file WeightedDegreePositionStringKernel.cpp.
CAlphabet* CWeightedDegreePositionStringKernel::alphabet [protected] |
alphabet of features
Definition at line 776 of file WeightedDegreePositionStringKernel.h.
bool CWeightedDegreePositionStringKernel::block_computation [protected] |
if block computation is used
Definition at line 739 of file WeightedDegreePositionStringKernel.h.
(internal) block weights
Definition at line 747 of file WeightedDegreePositionStringKernel.h.
external block weights
Definition at line 744 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::degree [protected] |
degree
Definition at line 722 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::length [protected] |
length
Definition at line 724 of file WeightedDegreePositionStringKernel.h.
float64_t* CWeightedDegreePositionStringKernel::m_poim [protected] |
temporary memory for the interface to the poim functions
Definition at line 766 of file WeightedDegreePositionStringKernel.h.
temporary memory for the interface to the poim functions
Definition at line 764 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::m_poim_num_feat [protected] |
length of string (==num_feat)
Definition at line 771 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::m_poim_num_sym [protected] |
number of symbols
Definition at line 769 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::m_poim_result_len [protected] |
total size of poim array
Definition at line 773 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::max_mismatch [protected] |
maximum mismatch
Definition at line 727 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::max_shift [protected] |
maximum shift
Definition at line 736 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::mkl_stepsize [protected] |
MKL stepsize
Definition at line 719 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::num_block_weights_external [protected] |
number of external block weights
Definition at line 742 of file WeightedDegreePositionStringKernel.h.
CTrie<POIMTrie> CWeightedDegreePositionStringKernel::poim_tries [protected] |
POIM tries
Definition at line 756 of file WeightedDegreePositionStringKernel.h.
bool* CWeightedDegreePositionStringKernel::position_mask [protected] |
position mask
Definition at line 714 of file WeightedDegreePositionStringKernel.h.
position weights
Definition at line 708 of file WeightedDegreePositionStringKernel.h.
position weights left-hand side
Definition at line 710 of file WeightedDegreePositionStringKernel.h.
position weights right-hand side
Definition at line 712 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::seq_length [protected] |
length of sequence
Definition at line 729 of file WeightedDegreePositionStringKernel.h.
int32_t* CWeightedDegreePositionStringKernel::shift [protected] |
shifts
Definition at line 732 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::shift_len [protected] |
length of shifts
Definition at line 734 of file WeightedDegreePositionStringKernel.h.
bool CWeightedDegreePositionStringKernel::tree_initialized [protected] |
if tree is initialized
Definition at line 759 of file WeightedDegreePositionStringKernel.h.
CTrie<DNATrie> CWeightedDegreePositionStringKernel::tries [protected] |
tries
Definition at line 754 of file WeightedDegreePositionStringKernel.h.
EWDKernType CWeightedDegreePositionStringKernel::type [protected] |
WeightedDegree kernel type
Definition at line 749 of file WeightedDegreePositionStringKernel.h.
bool CWeightedDegreePositionStringKernel::use_poim_tries [protected] |
makes add_example_to_tree (ONLY!) use POIMTrie
Definition at line 761 of file WeightedDegreePositionStringKernel.h.
float64_t* CWeightedDegreePositionStringKernel::weights [protected] |
weights
Definition at line 706 of file WeightedDegreePositionStringKernel.h.
weights buffer
Definition at line 717 of file WeightedDegreePositionStringKernel.h.
int32_t CWeightedDegreePositionStringKernel::which_degree [protected] |
which degree
Definition at line 751 of file WeightedDegreePositionStringKernel.h.