Commit de55df02 authored by mzed's avatar mzed
Browse files

override

parent 1addb41a
......@@ -37,7 +37,7 @@ public:
~classificationTemplate() {}
/** Train on a specified set, causes creation if not created */
bool train(const std::vector<trainingExampleTemplate<T> > &trainingSet);
bool train(const std::vector<trainingExampleTemplate<T> > &trainingSet) override;
/** Check the K values for each model. This feature is temporary, and will be replaced by a different design. */
std::vector<int> getK();
......
......@@ -43,27 +43,27 @@ public:
* @param A standard vector of type T to be evaluated.
* @return A single value of type T: the nearest class as determined by k-nearest neighbor.
*/
T run(const std::vector<T> &inputVector);
T run(const std::vector<T> &inputVector) override;
/** Fill the model with a vector of examples.
*
* @param The training set is a vector of training examples that contain both a vector of input values and a value specifying desired output class.
*
*/
void train(const std::vector<trainingExampleTemplate<T> > &trainingSet);
void train(const std::vector<trainingExampleTemplate<T> > &trainingSet) override;
/** Reset the model to its empty state. */
void reset();
void reset() override;
/** Find out how many inputs the model expects
* @return Integer number of intpus
*/
int getNumInputs() const;
int getNumInputs() const override;
/** Find out which inputs in a vector will be used
* @return Vector of ints, specifying input indices.
*/
std::vector<int> getWhichInputs() const;
std::vector<int> getWhichInputs() const override;
/** Get the number of nearest neighbours used by the kNN algorithm. */
int getK() const;
......@@ -76,7 +76,7 @@ public:
/** Populate a JSON value with a description of the current model
* @param A JSON value to be populated
*/
void getJSONDescription(Json::Value &currentModel);
void getJSONDescription(Json::Value &currentModel) override;
#endif
private:
......
......@@ -60,12 +60,12 @@ public:
* @param A standard vector of type T that feed-forward regression will run on.
* @return A single value, which is the result of the feed-forward operation
*/
T run(const std::vector<T> &inputVector);
T run(const std::vector<T> &inputVector) override;
void reset();
void reset() override;
int getNumInputs() const;
std::vector<int> getWhichInputs() const;
int getNumInputs() const override;
std::vector<int> getWhichInputs() const override;
int getNumHiddenLayers() const;
void setNumHiddenLayers(int num_hidden_layers);
......@@ -85,7 +85,7 @@ public:
T getOutBase() const;
#ifndef EMSCRIPTEN
void getJSONDescription(Json::Value &currentModel);
void getJSONDescription(Json::Value &currentModel) override;
#endif
......@@ -123,7 +123,7 @@ public:
* @param The training set is a vector of training examples that contain both a vector of input values and a value specifying desired output.
*
*/
void train(const std::vector<trainingExampleTemplate<T> > &trainingSet);
void train(const std::vector<trainingExampleTemplate<T> > &trainingSet) override;
private:
/** Parameters that influence learning */
......
......@@ -32,7 +32,7 @@ public:
~regressionTemplate() {};
/** Train on a specified set, causes creation if not created */
bool train(const std::vector<trainingExampleTemplate<T> > &trainingSet);
bool train(const std::vector<trainingExampleTemplate<T> > &trainingSet) override;
/** Check how many training epochs each model will run. This feature is temporary, and will be replaced by a different design. */
std::vector<int> getNumEpochs() const;
......
......@@ -65,15 +65,15 @@ public:
* @param The training set is a vector of training examples that contain both a vector of input values and a double specifying desired output class.
*
*/
void train(const std::vector<trainingExampleTemplate<T> > &trainingSet);
void train(const std::vector<trainingExampleTemplate<T> > &trainingSet) override;
/** Generate an output value from a single input vector.
* @param A standard vector of doubles to be evaluated.
* @return A single double: the nearest class as determined by k-nearest neighbor.
*/
T run(const std::vector<T> &inputVector);
T run(const std::vector<T> &inputVector) override;
void reset();
void reset() override;
/**
This initializes the SVM settings and parameters. Any previous model, settings, or problems will be cleared.
......@@ -102,12 +102,12 @@ public:
unsigned int kFoldValue
);
int getNumInputs() const;
std::vector<int> getWhichInputs() const;
int getNumInputs() const override;
std::vector<int> getWhichInputs() const override;
#ifndef EMSCRIPTEN
void getJSONDescription(Json::Value &currentModel);
void getJSONDescription(Json::Value &currentModel) override;
#endif
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment