17 SG_UNSTABLE(
"CSparsePolyFeatures::CSparsePolyFeatures()",
71 return vlen*(vlen+1)/2;
126 pf->m_feat->free_feature_vector(vec_idx2);
150 sizeof(int32_t), 0xDEADBEAF);
157 sizeof(int32_t), seed)&
mask;
207 sizeof(int32_t), seed)&
mask;
235 for (
int i=0; i<m_normalization_values_len; i++)
252 void CSparsePolyFeatures::init()
255 "Features in original space.");
259 "Dimensions of the input space.");
261 "Dimensions of the feature space of the polynomial kernel.");
264 "m_normalization_values",
"Norm of each training example");
virtual ~CSparsePolyFeatures()
virtual EFeatureClass get_feature_class() const
T sparse_dot(const SGSparseVector< T > &v)
CSparseFeatures< float64_t > * m_feat
void free_feature_iterator(void *iterator)
virtual float64_t dot(int32_t vec_idx1, CDotFeatures *df, int32_t vec_idx2)
int32_t m_output_dimensions
virtual void * get_feature_iterator(int32_t vector_index)
#define SG_NOTIMPLEMENTED
Features that support dot products among other operations.
EFeatureClass
shogun feature class
static uint32_t MurmurHash3(uint8_t *data, int32_t len, uint32_t seed)
virtual int32_t get_dim_feature_space() const
void add(bool *param, const char *name, const char *description="")
virtual float64_t dense_dot(int32_t vec_idx1, const float64_t *vec2, int32_t vec2_len)
CFeatures * duplicate() const
Class SGObject is the base class of all shogun objects.
int32_t get_num_features() const
virtual EFeatureClass get_feature_class() const =0
void free_feature_vector(int32_t num)
SGSparseVectorEntry< T > * features
SGSparseVector< ST > get_sparse_feature_vector(int32_t num)
virtual EFeatureType get_feature_type() const
EFeatureType
shogun feature type
float64_t * m_normalization_values
bool get_next_feature(int32_t &index, float64_t &value, void *iterator)
void add_vector(bool **param, index_t *length, const char *name, const char *description="")
all of classes and functions are contained in the shogun namespace
virtual void add_to_dense_vec(float64_t alpha, int32_t vec_idx1, float64_t *vec2, int32_t vec2_len, bool abs_val=false)
The class Features is the base class of all feature objects.
int32_t m_input_dimensions
virtual int32_t get_num_vectors() const
implement DotFeatures for the polynomial kernel
static float32_t sqrt(float32_t x)
virtual int32_t get_num_vectors() const
#define SG_UNSTABLE(func,...)
static int32_t pow(bool x, int32_t n)
virtual EFeatureType get_feature_type() const =0
void store_normalization_values()
virtual int32_t get_nnz_features_for_vector(int32_t num)