00001 #ifndef DATASET_HPP_ 00002 #define DATASET_HPP_ 00003 00004 #include <string> 00005 #include <vector> 00006 #include <iostream> 00007 00008 using namespace std; 00017 class Dataset { 00018 protected: 00019 vector < vector < double > > invec; 00020 vector < size_t > targetc; 00021 vector < vector < double > > prototypes; 00022 size_t nclasses; 00023 vector < size_t > ninc; 00024 public: 00025 Dataset() = delete; 00026 00028 Dataset(string fname, double enc0, double enc1); 00029 00034 const vector <double> & row(size_t i) const; 00035 00037 size_t getNClasses() const; 00038 00040 size_t getNRows() const; 00041 00046 size_t getTargetClass(size_t ind) const; 00047 00051 size_t getNRowsInClass(size_t c) const; 00052 00059 const vector <double> & prototype(size_t row); 00060 00061 00063 void toStream(ostream & ost) const; 00064 }; 00065 00066 #endif