diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/GazeAnalysis/TransitionMatrix.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/argaze/GazeAnalysis/TransitionMatrix.py b/src/argaze/GazeAnalysis/TransitionMatrix.py index 7806fcc..3eecca3 100644 --- a/src/argaze/GazeAnalysis/TransitionMatrix.py +++ b/src/argaze/GazeAnalysis/TransitionMatrix.py @@ -36,6 +36,6 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): sequence.append(aoi_scan_step.aoi) transition_matrix_probabilities = pandas.crosstab(pandas.Series(sequence[1:], name='to'), pandas.Series(sequence[:-1], name='from'), normalize='index') - transition_matrix_density = (transition_matrix_probabilities == 0.).astype(int).sum(axis=1).sum() / transition_matrix_probabilities.size + transition_matrix_density = (transition_matrix_probabilities != 0.).astype(int).sum(axis=1).sum() / transition_matrix_probabilities.size - return transition_matrix_probabilities , transition_matrix_density + return transition_matrix_probabilities, transition_matrix_density |