|
SHOGUN
v1.1.0
|
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.

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) |
| SGIO * | get_global_io () |
| void | set_global_parallel (Parallel *parallel) |
| Parallel * | get_global_parallel () |
| void | set_global_version (Version *version) |
| Version * | get_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 | |
| CFeatures * | features |
| Features object. | |
| float64_t * | labels |
| Labels (if applicable) | |
Protected Attributes inherited from CStreamingFile | |
| CIOBuffer * | buf |
| Buffer to hold stuff in memory. | |
| char | task |
| Task. | |
| char * | filename |
| Name of the handled file. | |
Additional Inherited Members | |
Public Attributes inherited from CSGObject | |
| SGIO * | io |
| Parallel * | parallel |
| Version * | version |
| Parameter * | m_parameters |
| Parameter * | m_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) |
Default constructor
Definition at line 110 of file StreamingFileFromSimpleFeatures.h.
| CStreamingFileFromSimpleFeatures | ( | CSimpleFeatures< T > * | feat | ) |
Constructor taking a SimpleFeatures object as arg
| feat | SimpleFeatures object |
Definition at line 117 of file StreamingFileFromSimpleFeatures.h.
| CStreamingFileFromSimpleFeatures | ( | CSimpleFeatures< T > * | feat, |
| float64_t * | lab | ||
| ) |
Constructor taking a SimpleFeatures object as arg
| feat | SimpleFeatures object |
| lab | Labels as float64_t* |
Definition at line 127 of file StreamingFileFromSimpleFeatures.h.
|
virtual |
Destructor
Definition at line 139 of file StreamingFileFromSimpleFeatures.h.
|
virtual |
Reimplemented from CStreamingFileFromFeatures.
Definition at line 87 of file StreamingFileFromSimpleFeatures.h.
|
virtual |
This function will be called for reading vectors from the corresponding SimpleFeatures object. It is specialized depending on class type T.
| vec | vector |
| len | length of vector |
Definition at line 153 of file StreamingFileFromSimpleFeatures.h.
|
virtual |
This function will be called for reading vectors and labels from the corresponding SimpleFeatures object. It is specialized depending on class type T.
| vec | vector |
| len | length of vector |
| label | label |
Definition at line 174 of file StreamingFileFromSimpleFeatures.h.
|
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.
|
protected |
SimpleFeatures object.
Definition at line 102 of file StreamingFileFromSimpleFeatures.h.
|
protected |
Index of vector to be returned from the feature matrix.
Definition at line 105 of file StreamingFileFromSimpleFeatures.h.