12 #ifndef __LIBSVMFILE_H__
13 #define __LIBSVMFILE_H__
21 class CDelimiterTokenizer;
24 template <
class ST>
class SGString;
25 template <
class T>
class SGSparseVector;
53 CLibSVMFile(
const char* fname,
char rw=
'r',
const char* name=NULL);
58 #ifndef SWIG // SWIG should skip this part
105 float64_t*& labels,
bool load_labels=
true);
108 float64_t*& labels,
bool load_labels=
true);
111 float64_t*& labels,
bool load_labels=
true);
114 float64_t*& labels,
bool load_labels=
true);
117 float64_t*& labels,
bool load_labels=
true);
120 float64_t*& labels,
bool load_labels=
true);
123 float64_t*& labels,
bool load_labels=
true);
126 float64_t*& labels,
bool load_labels=
true);
129 float64_t*& labels,
bool load_labels=
true);
132 float64_t*& labels,
bool load_labels=
true);
135 float64_t*& labels,
bool load_labels=
true);
138 float64_t*& labels,
bool load_labels=
true);
141 float64_t*& labels,
bool load_labels=
true);
324 #endif // #ifndef SWIG // SWIG should skip this part
326 virtual const char*
get_name()
const {
return "LibSVMFile"; }
333 void init_with_defaults();
336 int32_t get_num_lines();
342 char m_delimiter_feat;
345 char m_delimiter_label;
virtual const char * get_name() const
virtual void set_sparse_matrix(const SGSparseVector< bool > *matrix, int32_t num_feat, int32_t num_vec)
Class for buffered reading from a ascii file.
Class for reading from a string.
A File access base class.
all of classes and functions are contained in the shogun namespace
The class CDelimiterTokenizer is used to tokenize a SGVector into tokens using custom chars as ...
read sparse real valued features in svm light format e.g. -1 1:10.0 2:100.2 1000:1.3 with -1 == (optional) label and dim 1 - value 10.0 dim 2 - value 100.2 dim 1000 - value 1.3
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...
virtual void get_sparse_matrix(SGSparseVector< bool > *&matrix, int32_t &num_feat, int32_t &num_vec)