In [1]:
import generate_synthetic_data as gsd
import matplotlib.pyplot as plt
import template_patterns as tp
import recognizer as rc
AMPLITUDE_SIGMA = 0.05
TIME_SIGMA = 0.05
PATTERN_LENGTH = 70 # Must be multiple of 7
template_pat = tp.template_patterns()
In [5]:
# For testing 1 pattern
gsd.test_pattern_results(template_pat,'head and shoulders',AMPLITUDE_SIGMA,TIME_SIGMA,PATTERN_LENGTH)
Out[5]:
In [4]:
# For testing all pattern
accuracy_count = 0
template_pat = tp.template_patterns()
for pat_name in template_pat:
isCorrect = gsd.test_pattern_results(template_pat,pat_name,AMPLITUDE_SIGMA,TIME_SIGMA,PATTERN_LENGTH)
if isCorrect is True:
accuracy_count += 1
print('Accuracy: ' + str(accuracy_count) + '/' + str(len(template_pat)))
In [ ]:
In [ ]:
In [ ]: