KSquare Utilities
FeatureFileIODstWeb.h
Go to the documentation of this file.
1 #ifndef _FEATUREFILEIODSTWEB_
2 #define _FEATUREFILEIODSTWEB_
3 
4 #include "FeatureFileIO.h"
5 
6 namespace KKMLL
7 {
8  /**
9  ************************************************************************************************
10  * FeatureFileIODstWeb Sub-classed from FeatureFileIO. It supports the reading of the *
11  * "dst" file format used by for the Anonymous web data from www.microsoft.com. *
12  * For detailed description go to http://kdd.ics.uci.edu/databases/msweb/msweb.data.html *
13  * In addition to the layout described above you will need to add a line at the top of the *
14  * file of the format "ClassName = xxxx" where xxxx = the name of the attribute that will be *
15  * used as the Class-Name. *
16  ************************************************************************************************
17  * @see FeatureFileIO
18  */
20  {
21  public:
24 
26 
27  static FeatureFileIODstWebPtr Driver () {return &driver;}
28 
29  virtual FileDescPtr GetFileDesc (const KKStr& _fileName,
30  istream& _in,
31  MLClassListPtr _classList,
32  kkint32& _estSize,
33  KKStr& _errorMessage,
34  RunLog& _log
35  );
36 
37 
38  virtual FeatureVectorListPtr LoadFile (const KKStr& _fileName,
39  const FileDescPtr _fileDesc,
40  MLClassList& _classes,
41  istream& _in,
42  kkint32 _maxCount, // Maximum # images to load.
43  VolConstBool& _cancelFlag,
44  bool& _changesMade,
45  KKStr& _errorMessage,
46  RunLog& _log
47  );
48 
49 
50  virtual void SaveFile (FeatureVectorList& _data,
51  const KKStr& _fileName,
52  FeatureNumListConst& _selFeatures,
53  ostream& _out,
54  kkuint32& _numExamplesWritten,
55  VolConstBool& _cancelFlag,
56  bool& _successful,
57  KKStr& _errorMessage,
58  RunLog& _log
59  );
60 
61  private:
62  static FeatureFileIODstWeb driver;
63 
64  class AttrDescLine;
65  typedef AttrDescLine* AttrDescLinePtr;
67 
68  }; /* FeatureFileIODstWeb */
69 
70 
71 } /* namespace KKMLL */
72 
73 
74 #endif
__int32 kkint32
Definition: KKBaseTypes.h:88
virtual FileDescPtr GetFileDesc(const KKStr &_fileName, istream &_in, MLClassListPtr _classList, kkint32 &_estSize, KKStr &_errorMessage, RunLog &_log)
static FeatureFileIODstWebPtr Driver()
FeatureNumList const FeatureNumListConst
virtual FeatureVectorListPtr LoadFile(const KKStr &_fileName, const FileDescPtr _fileDesc, MLClassList &_classes, istream &_in, kkint32 _maxCount, VolConstBool &_cancelFlag, bool &_changesMade, KKStr &_errorMessage, RunLog &_log)
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
Container class for FeatureVector derived objects.
Base class for all FeatureFileIO classes.
Definition: FeatureFileIO.h:48
virtual void SaveFile(FeatureVectorList &_data, const KKStr &_fileName, FeatureNumListConst &_selFeatures, ostream &_out, kkuint32 &_numExamplesWritten, VolConstBool &_cancelFlag, bool &_successful, KKStr &_errorMessage, RunLog &_log)
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of &#39;std::string&#39; strings.
Definition: KKStr.cpp:1082
FileDesc * FileDescPtr
FeatureFileIODstWeb * FeatureFileIODstWebPtr
Used for logging messages.
Definition: RunLog.h:49
void EncodeProblem(const struct svm_paramater &param, struct svm_problem &prob_in, struct svm_problem &prob_out)
MLClassList * MLClassListPtr
Definition: MLClass.h:49
Maintains a list of MLClass instances.
Definition: MLClass.h:233
volatile const bool VolConstBool
Definition: KKBaseTypes.h:163