aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test/GazeAnalysis/TransitionMatrix.py
diff options
context:
space:
mode:
authorThéo de la Hogue2023-05-31 15:35:28 +0200
committerThéo de la Hogue2023-05-31 15:35:28 +0200
commite35e90d161ffb9202459631a0049448cde905b3c (patch)
tree0ad987c3ffcea30f739cc8e106df2a5f00ad22da /src/argaze.test/GazeAnalysis/TransitionMatrix.py
parentd1cdae406d349023eb9e221fd226c05744064dfd (diff)
downloadargaze-e35e90d161ffb9202459631a0049448cde905b3c.zip
argaze-e35e90d161ffb9202459631a0049448cde905b3c.tar.gz
argaze-e35e90d161ffb9202459631a0049448cde905b3c.tar.bz2
argaze-e35e90d161ffb9202459631a0049448cde905b3c.tar.xz
Testing all gaze analysis algorithm. Unifying paper citation.
Diffstat (limited to 'src/argaze.test/GazeAnalysis/TransitionMatrix.py')
-rw-r--r--src/argaze.test/GazeAnalysis/TransitionMatrix.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/argaze.test/GazeAnalysis/TransitionMatrix.py b/src/argaze.test/GazeAnalysis/TransitionMatrix.py
index 14a34ce..997b706 100644
--- a/src/argaze.test/GazeAnalysis/TransitionMatrix.py
+++ b/src/argaze.test/GazeAnalysis/TransitionMatrix.py
@@ -18,17 +18,18 @@ 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'])
-
+ def test_analyze(self):
+ """Test analyze method."""
+
transition_matrix_analyser = TransitionMatrix.AOIScanPathAnalyzer()
- transition_matrix_probabilities, transition_matrix_density = transition_matrix_analyser.analyze(aoi_scan_path)
+
+ aoi_scan_path = GazeFeaturesTest.build_aoi_scan_path(['Foo', 'Bar', 'Shu'], ['Bar', 'Shu', 'Foo', 'Bar'])
# Check aoi scan path
self.assertEqual(len(aoi_scan_path), 4)
+ transition_matrix_probabilities, transition_matrix_density = transition_matrix_analyser.analyze(aoi_scan_path)
+
# Check transition matrix probabilities ([destination][departure])
self.assertEqual(transition_matrix_probabilities['Foo']['Foo'], 0)
self.assertEqual(transition_matrix_probabilities['Bar']['Bar'], 0)