Features that compute the Weighted Spectrum Kernel feature space explicitly.
在文件ImplicitWeightedSpecFeatures.h第29行定义。

公有成员 | |
| CImplicitWeightedSpecFeatures (CStringFeatures< uint16_t > *str, bool normalize=true) | |
| CImplicitWeightedSpecFeatures (const CImplicitWeightedSpecFeatures &orig) | |
| virtual | ~CImplicitWeightedSpecFeatures () |
| virtual CFeatures * | duplicate () const |
| virtual int32_t | get_dim_feature_space () |
| virtual float64_t | dot (int32_t vec_idx1, int32_t vec_idx2) |
| virtual float64_t | dense_dot (int32_t vec_idx1, const float64_t *vec2, int32_t vec2_len) |
| virtual void | add_to_dense_vec (float64_t alpha, int32_t vec_idx1, float64_t *vec2, int32_t vec2_len, bool abs_val=false) |
| virtual int32_t | get_nnz_features_for_vector (int32_t num) |
| virtual EFeatureType | get_feature_type () |
| virtual EFeatureClass | get_feature_class () |
| virtual int32_t | get_num_vectors () |
| virtual int32_t | get_size () |
| bool | set_wd_weights () |
| bool | set_weights (float64_t *w, int32_t d) |
| virtual const char * | get_name () const |
保护成员 | |
| void | compute_normalization_const () |
保护属性 | |
| CStringFeatures< uint16_t > * | strings |
| float64_t * | normalization_factors |
| int32_t | num_strings |
| int32_t | alphabet_size |
| int32_t | degree |
| int32_t | spec_size |
| float64_t * | spec_weights |
| CImplicitWeightedSpecFeatures | ( | CStringFeatures< uint16_t > * | str, | |
| bool | normalize = true | |||
| ) |
constructor
| str | stringfeatures (of words) | |
| normalize | whether to use sqrtdiag normalization |
| CImplicitWeightedSpecFeatures | ( | const CImplicitWeightedSpecFeatures & | orig | ) |
copy constructor
| ~CImplicitWeightedSpecFeatures | ( | ) | [virtual] |
| void add_to_dense_vec | ( | float64_t | alpha, | |
| int32_t | vec_idx1, | |||
| float64_t * | vec2, | |||
| int32_t | vec2_len, | |||
| bool | abs_val = false | |||
| ) | [virtual] |
add vector 1 multiplied with alpha to dense vector2
| alpha | scalar alpha | |
| vec_idx1 | index of first vector | |
| vec2 | pointer to real valued vector | |
| vec2_len | length of real valued vector | |
| abs_val | if true add the absolute value |
实现了CDotFeatures。
| void compute_normalization_const | ( | ) | [protected] |
compute the sqrt diag normalization constant per string
compute dot product between vector1 and a dense vector
| vec_idx1 | index of first vector | |
| vec2 | pointer to real valued vector | |
| vec2_len | length of real valued vector |
实现了CDotFeatures。
| float64_t dot | ( | int32_t | vec_idx1, | |
| int32_t | vec_idx2 | |||
| ) | [virtual] |
compute dot product between vector1 and vector2, appointed by their indices
| vec_idx1 | index of first vector | |
| vec_idx2 | index of second vector |
实现了CDotFeatures。
| virtual int32_t get_dim_feature_space | ( | ) | [virtual] |
obtain the dimensionality of the feature space
(not mix this up with the dimensionality of the input space, usually obtained via get_num_features())
实现了CDotFeatures。
在文件ImplicitWeightedSpecFeatures.h第58行定义。
| virtual EFeatureClass get_feature_class | ( | ) | [virtual] |
| virtual EFeatureType get_feature_type | ( | ) | [virtual] |
| virtual const char* get_name | ( | ) | const [virtual] |
| virtual int32_t get_nnz_features_for_vector | ( | int32_t | num | ) | [virtual] |
get number of non-zero features in vector
| num | which vector |
实现了CDotFeatures。
在文件ImplicitWeightedSpecFeatures.h第94行定义。
| virtual int32_t get_num_vectors | ( | ) | [virtual] |
| virtual int32_t get_size | ( | ) | [virtual] |
| bool set_wd_weights | ( | ) |
| bool set_weights | ( | float64_t * | w, | |
| int32_t | d | |||
| ) |
set custom weights (swig compatible)
| w | weights | |
| d | degree (must match number of weights) |
int32_t alphabet_size [protected] |
size of alphabet
int32_t degree [protected] |
degree
float64_t* normalization_factors [protected] |
use sqrtdiag normalization
int32_t num_strings [protected] |
number of strings
int32_t spec_size [protected] |
size of k-mer spectrum
float64_t* spec_weights [protected] |
weights for each of the subkernels of degree 1...d
CStringFeatures<uint16_t>* strings [protected] |
reference to strings