aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test/GazeAnalysis/Entropy.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/argaze.test/GazeAnalysis/Entropy.py')
-rw-r--r--src/argaze.test/GazeAnalysis/Entropy.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/argaze.test/GazeAnalysis/Entropy.py b/src/argaze.test/GazeAnalysis/Entropy.py
index 47d5556..b69f329 100644
--- a/src/argaze.test/GazeAnalysis/Entropy.py
+++ b/src/argaze.test/GazeAnalysis/Entropy.py
@@ -18,20 +18,20 @@ GazeFeaturesTest = MiscFeatures.importFromTestPackage('GazeFeatures')
class TestAOIScanPathAnalyzer(unittest.TestCase):
"""Test AOIScanPathAnalyzer class."""
- def test_analyse(self):
- """Test analyse method."""
-
- aoi_scan_path = GazeFeaturesTest.build_aoi_scan_path(['Foo', 'Bar', 'Shu'], ['Bar', 'Shu', 'Foo', 'Bar', 'Shu', 'Foo', 'Bar', 'Shu', 'Foo'])
+ def test_analyze(self):
+ """Test analyze method."""
entropy_analyzer = Entropy.AOIScanPathAnalyzer()
transition_matrix_analyser = TransitionMatrix.AOIScanPathAnalyzer()
- transition_matrix_probabilities, transition_matrix_density = transition_matrix_analyser.analyze(aoi_scan_path)
- stationary_entropy, transition_entropy = entropy_analyzer.analyze(aoi_scan_path, transition_matrix_probabilities)
+ aoi_scan_path = GazeFeaturesTest.build_aoi_scan_path(['Foo', 'Bar', 'Shu'], ['Bar', 'Shu', 'Foo', 'Bar', 'Shu', 'Foo', 'Bar', 'Shu', 'Foo'])
# Check aoi scan path
self.assertEqual(len(aoi_scan_path), 9)
+ transition_matrix_probabilities, transition_matrix_density = transition_matrix_analyser.analyze(aoi_scan_path)
+ stationary_entropy, transition_entropy = entropy_analyzer.analyze(aoi_scan_path, transition_matrix_probabilities)
+
# Check entropy analysis
self.assertAlmostEqual(stationary_entropy, 1.09, 1)
self.assertAlmostEqual(transition_entropy, 0, 1)