print "Done: loading and training" print "Beginning execution" runningTotal = 0 for executeSample in range(testRecStop - testRecStart + 1): # computing output of test data using trained CE (time measured) # Saving error for each test data. firstTS = time.time() algoRes = algorithmTest.deNormalizeSnippet( algorithmTest.executeAndCluster(list(inDataTest[executeSample])), -1) secondTS = time.time() timestamps["test" + str(executeSample)] = secondTS - firstTS timestamps["delta" + str(executeSample)] = \ abs(np.asarray(algorithmTest.deNormalizeSnippet(\ algorithmTest.classify(\ algorithmTest.normalizeSnippet(\ outDataTest[executeSample], -1), -1), -1))\ - np.asarray(algoRes)) if printFlag == True: print algorithmTest.deNormalizeSnippet(\ algorithmTest.classify(\ algorithmTest.normalizeSnippet(\ outDataTest[executeSample], -1), -1), -1), \ algoRes runningTotal += outDataTest[executeSample] print "Done: execution" # computing average of the output test data avgActual = runningTotal / (1.0 * numExecuteSamples) # calculating the loading time of the whole training dataset netLoadingTime = 0
print "Done: loading and training" print "Beginning execution" runningTotal = 0 for executeSample in range(testRecStop - testRecStart + 1): # computing output of test data using trained CE (time measured) # Saving error for each test data. firstTS = time.time() algoRes = algorithmTest.deNormalizeSnippet( algorithmTest.executeAndCluster(list(inDataTest[executeSample])),-1) secondTS = time.time() timestamps["test" + str(executeSample)] = secondTS - firstTS timestamps["delta" + str(executeSample)] = \ abs(np.asarray(algorithmTest.deNormalizeSnippet(\ algorithmTest.classify(\ algorithmTest.normalizeSnippet(\ outDataTest[executeSample], -1), -1), -1))\ - np.asarray(algoRes)) if printFlag == True: print algorithmTest.deNormalizeSnippet(\ algorithmTest.classify(\ algorithmTest.normalizeSnippet(\ outDataTest[executeSample], -1), -1), -1), \ algoRes runningTotal += outDataTest[executeSample] print "Done: execution" # computing average of the output test data avgActual = runningTotal/(1.0*numExecuteSamples) # calculating the loading time of the whole training dataset