psifr.stats.count_category#
- psifr.stats.count_category(pool_items, recall_items, pool_category, recall_category, pool_test=None, recall_test=None, test=None)#
Count within-category transitions.
- Parameters:
pool_items (list) – List of the serial positions available for recall in each list. Must match the serial position codes used in recall_items.
recall_items (list) – List indicating the serial position of each recall in output order (NaN for intrusions).
pool_category (list) – List of the category of each item in the pool for each list.
recall_category (list) – List of item category in recall order.
pool_test (list, optional) – List of some test value for each item in the pool.
recall_test (list, optional) – List of some test value for each recall attempt by output position.
test (callable) – Callable that evaluates each transition between items n and n+1. Must take test values for items n and n+1 and return True if a given transition should be included.
- Returns:
actual (int) – Count of actual within-category transitions.
possible (int) – Count of possible within-category transitions.
Examples
>>> from psifr import stats >>> pool_items = [[1, 2, 3, 4]] >>> recall_items = [[4, 3, 1, 2]] >>> pool_category = [[1, 1, 2, 2]] >>> recall_category = [[2, 2, 1, 1]] >>> stats.count_category( ... pool_items, recall_items, pool_category, recall_category ... ) (2, 2)