diff options
Diffstat (limited to 'tools/dataProvider.h')
-rw-r--r-- | tools/dataProvider.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/dataProvider.h b/tools/dataProvider.h index d9440ce..0e6ed9e 100644 --- a/tools/dataProvider.h +++ b/tools/dataProvider.h @@ -3,8 +3,21 @@ #include<Eigen/Dense> #include "../tools/easylogging++.h" +#include<vector> // TODO decide how to construct training data +// One possible way for training data: +// Matrix composed of an array of feature vectors +// Labels are composed of linked list, such as +// 6,3,4,0,5,0,0 +// => 0->6 | 1->3 | 2->4->5 +// How to compensate for non exhaustive labeling? +// Use -1 to indicate not yet labeled data +// -1s will be excluded from training + +typedef Eigen::MatrixXd DataSet; + +typedef std::vector<double> Labels; class DataProvider //Virtual base class for data input { @@ -19,8 +32,8 @@ public: return attrSize; } - virtual Eigen::MatrixXd* getAttr() = 0; - virtual Eigen::VectorXd* getPref() = 0; + virtual int getDataSet(DataSet &out) = 0; + virtual int getLabel(Labels &out) = 0; virtual int open()=0; virtual bool EOFile()=0; }; |