Commit bbb3211e authored by Michael Zbyszyński's avatar Michael Zbyszyński
Browse files

adding test for createNewPhrase() api

parent 01fd24af
......@@ -104,9 +104,9 @@
<VS2015 targetFolder="Builds/VisualStudio2015">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="1" optimisation="1" targetName="RAPID_JUCE" headerPath="../../../../dependencies/Maximilian/"/>
isDebug="1" optimisation="1" targetName="regression_synth" headerPath="../../../../dependencies/Maximilian/"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="0" optimisation="3" targetName="RAPID_JUCE" headerPath="../../../../dependencies/Maximilian"/>
isDebug="0" optimisation="3" targetName="regression_synth" headerPath="../../../../dependencies/Maximilian"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../JUCE/modules"/>
......@@ -127,9 +127,9 @@
</VS2015>
<XCODE_MAC targetFolder="Builds/MacOSX">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="RAPID_JUCE"
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="regression_synth"
headerPath="../../../../dependencies/Maximilian"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="RAPID_JUCE"
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="regression_synth"
headerPath="../../../../dependencies/Maximilian"/>
</CONFIGURATIONS>
<MODULEPATHS>
......
......@@ -22,10 +22,6 @@ SCENARIO("Test NN Regression", "[machineLearning]")
std::vector<double> output = { 3.0 };
REQUIRE(myData.recordSingleElement("label", input, output) == 1); //FIXME: Label is stupd here. -MZ
//testing alternate API
auto newPhrase = myData.createNewPhrase("lab1");
newPhrase->addElement(input, output);
input = { 2.0, 44.2 };
output = { 20.14 };
REQUIRE(myData.recordSingleElement("label", input, output) == 3);
......@@ -128,19 +124,19 @@ SCENARIO("Test DTW classification", "[machineLearning]")
REQUIRE(myData.addElement(input, output) == 5);
myData.stopRecording();
myData.startRecording("setTwo");
//alternate API
auto setTwo = myData.createNewPhrase("setTwo");
input = { 1., 4. };
myData.addElement(input, output);
setTwo->addElement(input, output);
input = { 2., -3. };
myData.addElement(input, output);
setTwo->addElement(input, output);
input = { 1., 5. };
myData.addElement(input, output);
setTwo->addElement(input, output);
input = { -2., 1. };
myData.addElement(input, output);
myData.stopRecording();
setTwo->addElement(input, output);
REQUIRE(myDTW.train(myData) == true);
std::vector<std::vector<double> > inputSet1;
inputSet1.push_back( {1., 4.});
inputSet1.push_back( {2., -3.});
......
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