RapidLib  v2.2.0
A simple library for interactive machine learning
regression.h
Go to the documentation of this file.
1 
10 #ifndef REGRESSION_H
11 #define REGRESSION_H
12 
13 #include <vector>
14 #include "modelSet.h"
15 
22 template<typename T>
23 class regressionTemplate final : public modelSet<T>
24 {
25 public:
29  regressionTemplate(const std::vector<trainingExampleTemplate<T> > &trainingSet);
31  regressionTemplate(const int &numInputs, const int &numOutputs);
32 
35 
37  bool train(const std::vector<trainingExampleTemplate<T> > &trainingSet) override;
38 
40  float getTrainingProgress();
41 
43  std::vector<size_t> getNumEpochs() const;
44 
46  void setNumEpochs(const size_t &epochs);
47 
49  std::vector<size_t> getNumHiddenLayers() const;
50 
52  void setNumHiddenLayers(const int &num_hidden_layers);
53 
55  std::vector<size_t> getNumHiddenNodes() const;
56 
58  void setNumHiddenNodes(const int &num_hidden_nodes);
59 
60 private:
61  size_t numEpochs { 500 }; //Temporary -- also should be part of nn only. -mz
62  size_t numHiddenLayers { 1 }; //Temporary -- this should be part of the nn class. -mz
63  size_t numHiddenNodes; //Temporary -- also should be part of nn only. -mz
64  bool created;
65 };
66 
67 namespace rapidLib
68 {
69 //This is here so the old API still works
72 };
73 
74 #endif
Definition: modelSet.h:24
int numOutputs
Definition: modelSet.h:46
int numInputs
Definition: modelSet.h:44
Definition: regression.h:24
float getTrainingProgress()
Definition: regression.cpp:229
void setNumEpochs(const size_t &epochs)
Definition: regression.cpp:151
regressionTemplate()
Definition: regression.cpp:21
void setNumHiddenNodes(const int &num_hidden_nodes)
Definition: regression.cpp:117
std::vector< size_t > getNumEpochs() const
Definition: regression.cpp:133
void setNumHiddenLayers(const int &num_hidden_layers)
Definition: regression.cpp:83
std::vector< size_t > getNumHiddenLayers() const
Definition: regression.cpp:63
std::vector< size_t > getNumHiddenNodes() const
Definition: regression.cpp:97
bool train(const std::vector< trainingExampleTemplate< T > > &trainingSet) override
Definition: regression.cpp:166
~regressionTemplate()
Definition: regression.h:34
Definition: classification.h:75
Definition: trainingExample.h:19