11 #ifndef _HASHED_SPARSEFEATURES_H__
12 #define _HASHED_SPARSEFEATURES_H__
22 template <
class ST>
class CSparseFeatures;
23 template <
class ST>
class SGSparseVector;
49 bool keep_lin_terms =
true);
59 bool keep_lin_terms =
true);
69 bool keep_lin_terms =
true);
123 float64_t* vec2, int32_t vec2_len,
bool abs_val =
false);
168 virtual const char*
get_name()
const;
236 #endif // _HASHED_SPARSEFEATURES_H__
CSparseFeatures< ST > * sparse_feats
virtual int32_t get_dim_feature_space() const
Template class SparseFeatures implements sparse matrices.
CHashedSparseFeatures(int32_t size=0, bool use_quadr=false, bool keep_lin_terms=true)
virtual EFeatureType get_feature_type() const
virtual ~CHashedSparseFeatures()
Features that support dot products among other operations.
EFeatureClass
shogun feature class
virtual int32_t get_nnz_features_for_vector(int32_t num)
This class is identical to the CDenseFeatures class except that it hashes each dimension to a new fea...
virtual float64_t dot(int32_t vec_idx1, CDotFeatures *df, int32_t vec_idx2)
A File access base class.
virtual void free_feature_iterator(void *iterator)
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 const char * get_name() const
virtual CFeatures * duplicate() const
EFeatureType
shogun feature type
all of classes and functions are contained in the shogun namespace
virtual int32_t get_num_vectors() const
The class Features is the base class of all feature objects.
virtual EFeatureClass get_feature_class() const
SGSparseVector< ST > get_hashed_feature_vector(int32_t vec_idx) const
virtual void * get_feature_iterator(int32_t vector_index)
virtual bool get_next_feature(int32_t &index, float64_t &value, void *iterator)
virtual float64_t dense_dot(int32_t vec_idx1, const float64_t *vec2, int32_t vec2_len)
static SGSparseVector< ST > hash_vector(SGVector< ST > vec, int32_t dim, bool use_quadratic=false, bool keep_linear_terms=true)