|
SHOGUN
v1.1.0
|
Class StreamingFileFromFeatures to read vector-by-vector from a CFeatures object.
The object must be initialized with another CFeatures object. It is upto the derived class to implement specialized functions to return the vector.
Only a subset of the functions defined in StreamingFile.h need to be implemented, as appropriate for the CFeatures object which the class works with.
For example, a derived class based on SimpleFeatures should only implement the get_(type)*_vector() functions, and a class based on StringFeatures should only implement the get_(type)*_string() functions.
Definition at line 34 of file StreamingFileFromFeatures.h.

Public Member Functions | |
| 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) |
| virtual const char * | get_name () const |
Public Member Functions inherited from CStreamingFile | |
| CStreamingFile () | |
| CStreamingFile (char *fname, char rw='r') | |
| virtual | ~CStreamingFile () |
| void | close () |
| virtual bool | is_seekable () |
| virtual void | reset_stream () |
| 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 | |
| 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 14 of file StreamingFileFromFeatures.cpp.
| CStreamingFileFromFeatures | ( | CFeatures * | feat | ) |
Constructor taking a CFeatures object as argument
| feat | features object |
Definition at line 21 of file StreamingFileFromFeatures.cpp.
| CStreamingFileFromFeatures | ( | CFeatures * | feat, |
| float64_t * | lab | ||
| ) |
Constructor taking a CFeatures object and labels as arguments
| feat | features object |
| lab | labels as float64_t* |
Definition at line 28 of file StreamingFileFromFeatures.cpp.
|
virtual |
Destructor
Definition at line 35 of file StreamingFileFromFeatures.cpp.
|
virtual |
Reimplemented from CStreamingFile.
Reimplemented in CStreamingFileFromSimpleFeatures< T >, CStreamingFileFromSparseFeatures< T >, and CStreamingFileFromStringFeatures< T >.
Definition at line 85 of file StreamingFileFromFeatures.h.
|
virtual |
Set the features object
| feat | features object as argument |
Definition at line 67 of file StreamingFileFromFeatures.h.
|
virtual |
Set the labels
| lab | array of labels |
Definition at line 78 of file StreamingFileFromFeatures.h.
|
protected |
Features object.
Definition at line 95 of file StreamingFileFromFeatures.h.
|
protected |
Labels (if applicable)
Definition at line 98 of file StreamingFileFromFeatures.h.