KSquare Utilities
FeatureFileIORoberts.h
Go to the documentation of this file.
1 #ifndef _FEATUREFILEIOROBERTS_
2 #define _FEATUREFILEIOROBERTS_
3 
4 #include "FeatureFileIO.h"
5 
6 
7 namespace KKMLL
8 {
9 
10 
11  /**
12  @class FeatureFileIORoberts
13  @brief Supports the writing of Feature Data to a file that can then be read by OpenDT.
14  @details
15  @code
16  * ************************************************************************************************
17  * * FeatureFileIOSRoberts Sub-classed from FeatureFileIO. It supports the writing of a file *
18  * * that can be read by OpenDT. http://opendt.sourceforge.net/. This file format is similar to *
19  * * C45 except the contents of the names file are included in the data file. *
20  * ************************************************************************************************
21  @endcode
22  * @see FeatureFileIO
23  */
25  {
26  public:
29 
31 
32  static FeatureFileIORobertsPtr Driver () {return &driver;}
33 
34  virtual FileDescPtr GetFileDesc (const KKStr& _fileName,
35  istream& _in,
36  MLClassListPtr _classList,
37  kkint32& _estSize,
38  KKStr& _errorMessage,
39  RunLog& _log
40  );
41 
42 
43  virtual FeatureVectorListPtr LoadFile (const KKStr& _fileName,
44  const FileDescPtr _fileDesc,
45  MLClassList& _classes,
46  istream& _in,
47  kkint32 _maxCount, // Maximum # images to load.
48  VolConstBool& _cancelFlag,
49  bool& _changesMade,
50  KKStr& _errorMessage,
51  RunLog& _log
52  );
53 
54 
55  virtual void SaveFile (FeatureVectorList& _data,
56  const KKStr& _fileName,
57  FeatureNumListConst& _selFeatures,
58  ostream& _out,
59  kkuint32& _numExamplesWritten,
60  VolConstBool& _cancelFlag,
61  bool& _successful,
62  KKStr& _errorMessage,
63  RunLog& _log
64  );
65 
66 
67 
68  private:
69  static FeatureFileIORoberts driver;
70 
71  };
72 
73 } /* namespace KKMLL */
74 
75 #endif
virtual FileDescPtr GetFileDesc(const KKStr &_fileName, istream &_in, MLClassListPtr _classList, kkint32 &_estSize, KKStr &_errorMessage, RunLog &_log)
virtual void SaveFile(FeatureVectorList &_data, const KKStr &_fileName, FeatureNumListConst &_selFeatures, ostream &_out, kkuint32 &_numExamplesWritten, VolConstBool &_cancelFlag, bool &_successful, KKStr &_errorMessage, RunLog &_log)
__int32 kkint32
Definition: KKBaseTypes.h:88
Supports the writing of Feature Data to a file that can then be read by OpenDT.
FeatureNumList const FeatureNumListConst
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
static FeatureFileIORobertsPtr Driver()
Container class for FeatureVector derived objects.
Base class for all FeatureFileIO classes.
Definition: FeatureFileIO.h:48
virtual FeatureVectorListPtr LoadFile(const KKStr &_fileName, const FileDescPtr _fileDesc, MLClassList &_classes, istream &_in, kkint32 _maxCount, VolConstBool &_cancelFlag, bool &_changesMade, 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
FeatureFileIORoberts * FeatureFileIORobertsPtr
FileDesc * FileDescPtr
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