dataset.h
Go to the documentation of this file.
1 #ifndef DATASET_H
2 #define DATASET_H
3 
4 /*
5  * dataset.h
6  * Copyright (c) 2016 Georgetown University. All Rights Reserved.
7  */
8 
9 #include <string>
10 #include <iostream>
11 #include <vector>
12 #include <stdexcept>
13 #include "attributes.h"
14 #include "examples.h"
15 
16 using namespace std;
17 
25 class DataSet {
26 
35  friend ostream &operator<<( ostream &out, const DataSet &ds );
36 
37  protected:
38 
40  string name;
41 
44 
47 
49  long seed = 2026875034;
50 
51  public:
52 
54  DataSet();
55 
64  DataSet( const Attributes &attributes ) throw ( logic_error );
65 
73  void add( const DataSet &dataset ) throw ( logic_error );
74 
82  void add( const Example &example ) throw ( logic_error );
83 
90  Attributes getAttributes() const;
91 
98  Examples getExamples() const;
99 
106  long getSeed() const;
107 
115  bool getHasNominalAttributes() const;
116 
124  bool getHasNumericAttributes() const;
125 
133  void load( string filename ) throw ( logic_error );
134 
143  void parse( istream &in ) throw ( logic_error );
144 
153  void setOptions( const vector<string> &options ) throw ( logic_error );
154 
162  void setSeed( long seed );
163 
164 }; // DataSet class
165 
166 #endif
Examples examples
Definition: dataset.h:46
Attributes attributes
Definition: dataset.h:43
string name
Definition: dataset.h:40
Definition: attributes.h:26
Definition: dataset.h:25
Definition: examples.h:26
Definition: example.h:23
ostream & operator<<(ostream &out, const Attribute &a)
Definition: attribute.cc:31