Public Member Functions | Protected Attributes

CStreamingFileFromSparseFeatures< T > Class Template Reference


Detailed Description

template<class T>
class shogun::CStreamingFileFromSparseFeatures< T >

Class CStreamingFileFromSparseFeatures is derived from CStreamingFile and provides an input source for the online framework. It uses an existing CSparseFeatures object to generate online examples.

Definition at line 22 of file StreamingFileFromSparseFeatures.h.

Inheritance diagram for CStreamingFileFromSparseFeatures< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CStreamingFileFromSparseFeatures ()
 CStreamingFileFromSparseFeatures (CSparseFeatures< T > *feat)
 CStreamingFileFromSparseFeatures (CSparseFeatures< T > *feat, float64_t *lab)
virtual ~CStreamingFileFromSparseFeatures ()
virtual void get_sparse_vector (SGSparseVectorEntry< T > *&vec, int32_t &len)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< T > *&vec, int32_t &len, float64_t &label)
void reset_stream ()
virtual const char * get_name () const

Protected Attributes

CSparseFeatures< T > * features
 SparseFeatures object.
int32_t vector_num
 Index of vector to be returned from the feature matrix.

Constructor & Destructor Documentation

Default constructor

Definition at line 104 of file StreamingFileFromSparseFeatures.h.

Constructor taking a SparseFeatures object as arg

Parameters:
feat SparseFeatures object

Definition at line 111 of file StreamingFileFromSparseFeatures.h.

Constructor taking a SparseFeatures object as arg

Parameters:
feat SparseFeatures object
lab Labels as float64_t*

Definition at line 118 of file StreamingFileFromSparseFeatures.h.

Destructor

Definition at line 125 of file StreamingFileFromSparseFeatures.h.


Member Function Documentation

virtual const char* get_name ( void   )  const [virtual]
Returns:
object name

Reimplemented from CStreamingFileFromFeatures.

Definition at line 82 of file StreamingFileFromSparseFeatures.h.

void get_sparse_vector ( SGSparseVectorEntry< T > *&  vec,
int32_t &  len 
) [virtual]

This function will be called for reading vectors from the corresponding SparseFeatures object. It is specialized depending on class type T.

Parameters:
vec vector
len length of vector

Definition at line 138 of file StreamingFileFromSparseFeatures.h.

void get_sparse_vector_and_label ( SGSparseVectorEntry< T > *&  vec,
int32_t &  len,
float64_t label 
) [virtual]

This function will be called for reading vectors and labels from the corresponding SparseFeatures object. It is specialized depending on class type T.

Parameters:
vec vector
len length of vector
label label

Definition at line 160 of file StreamingFileFromSparseFeatures.h.

void reset_stream (  )  [virtual]

Reset the stream so the next example returned is the first example in the SparseFeatures object.

Reimplemented from CStreamingFile.

Definition at line 76 of file StreamingFileFromSparseFeatures.h.


Member Data Documentation

CSparseFeatures<T>* features [protected]

SparseFeatures object.

Reimplemented from CStreamingFileFromFeatures.

Definition at line 96 of file StreamingFileFromSparseFeatures.h.

int32_t vector_num [protected]

Index of vector to be returned from the feature matrix.

Definition at line 99 of file StreamingFileFromSparseFeatures.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation