Skip to content
Snippets Groups Projects
Commit 18297da9 authored by Francisco Bernardo's avatar Francisco Bernardo
Browse files

there is still a compile time error with training data here

parent 6622b16c
Branches
Tags
No related merge requests found
......@@ -18,6 +18,7 @@ namespace rapidmix { class trainingData; }
class rapidGVF {
public:
rapidGVF();
~rapidGVF();
......
......@@ -9,7 +9,8 @@
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include "catch.hpp"
#include "machineLearning.h"
#include "trainingData.h"
#include "GVF.h"
TEST_CASE( "Tests default GVF ctor.", "[GVF]" ) {
......@@ -36,10 +37,8 @@ TEST_CASE( "Tests default GVFGesture ctor.", "[GVF]" ) {
gvf->setScalingsVariance(0.00001f); //0.00001f); //0.000002f); //0.00004f);
gvf->setDynamicsVariance(0.0001f);
vector<vector<float>> trainingData;
if(gvf->getState() == GVF::STATE_LEARNING)
{
gvf->startGesture();
......@@ -49,7 +48,6 @@ TEST_CASE( "Tests default GVFGesture ctor.", "[GVF]" ) {
// Fill the template
gesture.addObservation(*frame);
}
}
gvf->setState(GVF::STATE_FOLLOWING);
......@@ -86,31 +84,29 @@ SCENARIO("Test GVF Regression", "[machineLearning]")
{
GIVEN("gvf object and training dataset")
{
// rapidmix::variationFollowing gvf;
//
rapidmix::gvfTemporalVariation gvf;
// rapidmix::trainingData myData;
// std::vector<double> input = { 0.2, 0.7 };
// std::vector<double> output = { 3.0 };
std::vector<double> input = { 0.2, 0.7 };
std::vector<double> output = { 3.0 };
// myData.addElement(input, output);
//
// input = { 2.0, 44.2 };
// output = { 20.14 };
input = { 2.0, 44.2 };
output = { 20.14 };
// myData.addElement(input, output);
//
// gvf.train(myData);
// gvf.process(input);
gvf.process(input);
std::string filepath2 = "/var/tmp/modelSetDescription_gvf.json";
// gvf.writeJSON(filepath2);
// rapidmix::staticClassification gvfFromString;
// gvfFromString.putJSON(gvf.getJSON());
// rapidmix::staticClassification gvfFromFile;
// gvfFromFile.readJSON(filepath2);
std::vector<double> inputVec = { 2.0, 44.2 };
......
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