10 #ifndef S_DATASTRUCTURES_S 11 #define S_DATASTRUCTURES_S 28 std::vector<std::string> names;
29 std::vector<std::vector<double>> inputs;
30 std::vector<std::vector<double>> results;
32 struct ds operator+(const struct ds x) const{
33 struct ds newDs{names, inputs, results};
34 newDs.names.insert(newDs.names.end(), x.names.begin(), x.names.end());
35 newDs.inputs.insert(newDs.inputs.end(), x.inputs.begin(), x.inputs.end());
36 newDs.results.insert(newDs.results.end(), x.results.begin(), x.results.end());
49 auto starti = this->inputs.begin() + start, startr = this->results.begin() + start,
50 endi = this->inputs.begin() + end, endr = this->results.begin() + end;
51 auto startn = this->names.begin() + start, endn = this->names.begin() + end;
54 if(end >= this->inputs.size()){
55 endi = this->inputs.end(); endr = this->results.end(); endn = this->names.end();
59 std::vector<std::vector<double>> newInputs{starti, endi}, newResults{startr, endr};
60 std::vector<std::string> newNames{startn, endn};
61 this->inputs.erase(starti, endi); this->results.erase(startr, endr); this->names.erase(startn, endn);
63 return {newNames, newInputs, newResults};
79 std::size_t max_epoch, mb;
83 std::function<void(struct p &par, const size_t epoch)> update;
86 typedef std::vector<std::vector<double>> weightsMatrix;
This is the struct that represents the dataset to handle. It has three attributes: ...
Definition: dataStructures.h:27
The parameters object. It holds all the settable hyper-parameters:
Definition: dataStructures.h:78
Definition: constants.h:15
struct ds extractData(const size_t start, const size_t end)
Creates a new dataset from a subset of a given dataset. The dataset on which this method is call will...
Definition: dataStructures.h:48