11 #ifndef _STREAMING_SPARSEFEATURES__H__
12 #define _STREAMING_SPARSEFEATURES__H__
219 T
dense_dot(T alpha, T* vec, int32_t dim, T b);
324 virtual const char*
get_name()
const {
return "StreamingSparseFeatures"; }
347 virtual void init(
CStreamingFile *file,
bool is_labelled, int32_t size);
351 CInputParser< SGSparseVectorEntry<T> >
parser;
367 #endif // _STREAMING_SPARSEFEATURES__H__
index_t current_vec_index
The current vector index.
virtual void set_vector_reader()
int32_t current_num_features
Number of features in current vector (as seen so far upto the current vector)
int64_t get_num_nonzero_entries()
T get_feature(int32_t index)
virtual void add_to_dense_vec(float64_t alpha, float64_t *vec2, int32_t vec2_len, bool abs_val=false)
virtual void start_parser()
SGSparseVector< T > get_vector()
virtual EFeatureType get_feature_type() const
virtual int32_t get_num_features()
CStreamingSparseFeatures()
static T sparse_dot(T alpha, SGSparseVectorEntry< T > *avec, int32_t alen, SGSparseVectorEntry< T > *bvec, int32_t blen)
EFeatureClass
shogun feature class
virtual void reset_stream()
float32_t compute_squared()
A Streaming File access class.
virtual float32_t dot(CStreamingDotFeatures *df)
virtual int32_t get_nnz_features_for_vector()
virtual int32_t get_dim_feature_space() const
virtual CFeatures * duplicate() const
Streaming features that support dot products among other operations.
virtual int32_t get_num_vectors() const
float64_t current_label
The current example's label.
EFeatureType
shogun feature type
SGSparseVector< T > current_sgvector
The current example's feature vector as an SGVector
virtual EFeatureClass get_feature_class() const
all of classes and functions are contained in the shogun namespace
virtual float64_t get_label()
virtual void end_parser()
CInputParser< SGSparseVectorEntry< T > > parser
The parser object, which reads from input and returns parsed example objects.
template class SGSparseVectorEntry
virtual bool get_next_example()
int32_t set_num_features(int32_t num)
The class Features is the base class of all feature objects.
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...
virtual void set_vector_and_label_reader()
T dense_dot(T alpha, T *vec, int32_t dim, T b)
This class implements streaming features with sparse feature vectors. The vector is represented as an...
virtual const char * get_name() const
virtual void release_example()
virtual ~CStreamingSparseFeatures()