mode()¶
- audpsychometric.mode(ratings, *, axis=1)[source]¶
Mode of categorical ratings.
None
andnan
values are ignored per item. If the values are numerical and there are several winning categories, the average over those is returned, and rounded to the next higher integer. If the values are not numerical, the first occurring value is returned.- Parameters
- Return type
- Returns
mode over raters
Examples
>>> mode([0, 0, 1]) 0 >>> mode(["a", "a", "b"]) 'a' >>> mode([0, 1]) 1 >>> mode(["a", "b"]) 'a' >>> mode([0, 2]) 1 >>> mode(["a", "c"]) 'a' >>> mode([None, None, "a"]) 'a'