non_aoi_fixation_duration_ratio#
- pymovements.measure.reading.non_aoi_fixation_duration_ratio(duration: str | Expr = 'duration', word_idx: str | Expr = 'word_idx') Expr[source]#
Ratio of fixation duration outside any AOI (NAFDR).
NAFDR is a summary of a whole reading sequence, not a word-level measure: aggregate it over reading-sequence groups (e.g.
['trial', 'page']) instead of word groups. Null when the total fixation duration of the group is zero.A fixation counts as outside all AOIs if and only if its word index is null, which is the convention produced by
map_to_aois(). Datasets that encode outside-AOI fixations with a sentinel value such as-1must convert those values to null first, otherwise the ratio is silently underestimated.The input must contain only fixation events, so filter the event frame to fixations first: non-fixation rows carry null AOI columns after
map_to_aois()and would inflate the ratio.- Parameters:
- Returns:
Aggregation expression producing the
NAFDRcolumn (proportion of fixation duration without a mapped word, 0.0 to 1.0).- Return type:
pl.Expr