SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
CStreamingFileFromSimpleFeatures< T > Class Template Reference

Detailed Description

template<class T>
class shogun::CStreamingFileFromSimpleFeatures< T >

Class CStreamingFileFromSimpleFeatures is a derived class of CStreamingFile which creates an input source for the online framework from a CSimpleFeatures object.

This kind of input is seekable, and hence can be used for making multiple passes over data.

It is useful for testing/comparison purposes.

Definition at line 27 of file StreamingFileFromSimpleFeatures.h.

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

Public Member Functions

 CStreamingFileFromSimpleFeatures ()
 CStreamingFileFromSimpleFeatures (CSimpleFeatures< T > *feat)
 CStreamingFileFromSimpleFeatures (CSimpleFeatures< T > *feat, float64_t *lab)
virtual ~CStreamingFileFromSimpleFeatures ()
virtual void get_vector (T *&vec, int32_t &len)
virtual void get_vector_and_label (T *&vec, int32_t &len, float64_t &label)
void reset_stream ()
virtual const char * get_name () const
- Public Member Functions inherited from CStreamingFileFromFeatures
 CStreamingFileFromFeatures ()
 CStreamingFileFromFeatures (CFeatures *feat)
 CStreamingFileFromFeatures (CFeatures *feat, float64_t *lab)
virtual ~CStreamingFileFromFeatures ()
virtual void set_features (CFeatures *feat)
virtual void set_labels (float64_t *lab)
- Public Member Functions inherited from CStreamingFile
 CStreamingFile ()
 CStreamingFile (char *fname, char rw='r')
virtual ~CStreamingFile ()
void close ()
virtual bool is_seekable ()
virtual void get_vector (VwExample *&ex, int32_t &len)
virtual void get_vector_and_label (VwExample *&ex, int32_t &len, float64_t &label)
virtual void get_vector (bool *&vector, int32_t &len)
virtual void get_vector (uint8_t *&vector, int32_t &len)
virtual void get_vector (char *&vector, int32_t &len)
virtual void get_vector (int32_t *&vector, int32_t &len)
virtual void get_vector (float32_t *&vector, int32_t &len)
virtual void get_vector (float64_t *&vector, int32_t &len)
virtual void get_vector (int16_t *&vector, int32_t &len)
virtual void get_vector (uint16_t *&vector, int32_t &len)
virtual void get_vector (int8_t *&vector, int32_t &len)
virtual void get_vector (uint32_t *&vector, int32_t &len)
virtual void get_vector (int64_t *&vector, int32_t &len)
virtual void get_vector (uint64_t *&vector, int32_t &len)
virtual void get_vector (floatmax_t *&vector, int32_t &len)
virtual void get_vector_and_label (bool *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (uint8_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (char *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (int32_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (float32_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (float64_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (int16_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (uint16_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (int8_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (uint32_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (int64_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (uint64_t *&vector, int32_t &len, float64_t &label)
virtual void get_vector_and_label (floatmax_t *&vector, int32_t &len, float64_t &label)
virtual void get_string (bool *&vector, int32_t &len)
virtual void get_string (uint8_t *&vector, int32_t &len)
virtual void get_string (char *&vector, int32_t &len)
virtual void get_string (int32_t *&vector, int32_t &len)
virtual void get_string (float32_t *&vector, int32_t &len)
virtual void get_string (float64_t *&vector, int32_t &len)
virtual void get_string (int16_t *&vector, int32_t &len)
virtual void get_string (uint16_t *&vector, int32_t &len)
virtual void get_string (int8_t *&vector, int32_t &len)
virtual void get_string (uint32_t *&vector, int32_t &len)
virtual void get_string (int64_t *&vector, int32_t &len)
virtual void get_string (uint64_t *&vector, int32_t &len)
virtual void get_string (floatmax_t *&vector, int32_t &len)
virtual void get_string_and_label (bool *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (uint8_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (char *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (int32_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (float32_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (float64_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (int16_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (uint16_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (int8_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (uint32_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (int64_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (uint64_t *&vector, int32_t &len, float64_t &label)
virtual void get_string_and_label (floatmax_t *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector (SGSparseVectorEntry< bool > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< uint8_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< char > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< int32_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< float32_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< float64_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< int16_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< uint16_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< int8_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< uint32_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< int64_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< uint64_t > *&vector, int32_t &len)
virtual void get_sparse_vector (SGSparseVectorEntry< floatmax_t > *&vector, int32_t &len)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< bool > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< uint8_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< char > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< int32_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< float32_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< float64_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< int16_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< uint16_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< int8_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< uint32_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< int64_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< uint64_t > *&vector, int32_t &len, float64_t &label)
virtual void get_sparse_vector_and_label (SGSparseVectorEntry< floatmax_t > *&vector, int32_t &len, float64_t &label)
- Public Member Functions inherited from CSGObject
 CSGObject ()
 CSGObject (const CSGObject &orig)
virtual ~CSGObject ()
virtual bool is_generic (EPrimitiveType *generic) const
template<class T >
void set_generic ()
void unset_generic ()
virtual void print_serializable (const char *prefix="")
virtual bool save_serializable (CSerializableFile *file, const char *prefix="")
virtual bool load_serializable (CSerializableFile *file, const char *prefix="")
void set_global_io (SGIO *io)
SGIOget_global_io ()
void set_global_parallel (Parallel *parallel)
Parallelget_global_parallel ()
void set_global_version (Version *version)
Versionget_global_version ()
SGVector< char * > get_modelsel_names ()
char * get_modsel_param_descr (const char *param_name)
index_t get_modsel_param_index (const char *param_name)

Protected Attributes

CSimpleFeatures< T > * features
 SimpleFeatures object.
int32_t vector_num
 Index of vector to be returned from the feature matrix.
- Protected Attributes inherited from CStreamingFileFromFeatures
CFeaturesfeatures
 Features object.
float64_tlabels
 Labels (if applicable)
- Protected Attributes inherited from CStreamingFile
CIOBufferbuf
 Buffer to hold stuff in memory.
char task
 Task.
char * filename
 Name of the handled file.

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
Parallelparallel
Versionversion
Parameterm_parameters
Parameterm_model_selection_parameters
- Protected Member Functions inherited from CSGObject
virtual void load_serializable_pre () throw (ShogunException)
virtual void load_serializable_post () throw (ShogunException)
virtual void save_serializable_pre () throw (ShogunException)
virtual void save_serializable_post () throw (ShogunException)

Constructor & Destructor Documentation

Default constructor

Definition at line 110 of file StreamingFileFromSimpleFeatures.h.

Constructor taking a SimpleFeatures object as arg

Parameters
featSimpleFeatures object

Definition at line 117 of file StreamingFileFromSimpleFeatures.h.

Constructor taking a SimpleFeatures object as arg

Parameters
featSimpleFeatures object
labLabels as float64_t*

Definition at line 127 of file StreamingFileFromSimpleFeatures.h.

Destructor

Definition at line 139 of file StreamingFileFromSimpleFeatures.h.

Member Function Documentation

virtual const char* get_name ( ) const
virtual
Returns
object name

Reimplemented from CStreamingFileFromFeatures.

Definition at line 87 of file StreamingFileFromSimpleFeatures.h.

void get_vector ( T *&  vec,
int32_t &  len 
)
virtual

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

Parameters
vecvector
lenlength of vector

Definition at line 153 of file StreamingFileFromSimpleFeatures.h.

void get_vector_and_label ( T *&  vec,
int32_t &  len,
float64_t label 
)
virtual

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

Parameters
vecvector
lenlength of vector
labellabel

Definition at line 174 of file StreamingFileFromSimpleFeatures.h.

void reset_stream ( )
virtual

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

Reimplemented from CStreamingFile.

Definition at line 81 of file StreamingFileFromSimpleFeatures.h.

Member Data Documentation

CSimpleFeatures<T>* features
protected

SimpleFeatures object.

Definition at line 102 of file StreamingFileFromSimpleFeatures.h.

int32_t vector_num
protected

Index of vector to be returned from the feature matrix.

Definition at line 105 of file StreamingFileFromSimpleFeatures.h.


The documentation for this class was generated from the following file:

SHOGUN Machine Learning Toolbox - Documentation