Show when in the recall sequence a particular studied item tends to appear.
The nth-item recall curve shows when in the recall sequence a particular studied item tends to be recalled. Two variants are provided: a simple curve that computes unconditional recall probability at each output position, and a conditional curve that conditions on the item being available (not yet recalled) and the recall sequence continuing (the previous output was a valid recall, not a termination).
if mode =="conditional": plot_conditional_nth_item_recall_curve(data, trial_mask, query_study_position=query_study_position, confidence_level=confidence_level)else: plot_simple_nth_item_recall_curve(data, trial_mask, query_study_position=query_study_position, confidence_level=confidence_level)if ylim isnotNone:for ax in plt.gcf().axes: ax.set_ylim(ylim)save_figure(figure_dir, figure_str)
Interpretation
The x-axis shows output position and the y-axis shows the probability of recalling the queried study position at that point in the sequence. Key patterns:
Early peak for recency items: items near the end of the study list tend to be recalled early in the output sequence.
Late peak for primacy items: items near the start tend to appear later in the output sequence.
Conditional vs. simple: the conditional curve removes the declining baseline of available items, isolating the retrieval dynamics.
API Details
Notebook parameters
data_path — path to an HDF5 file containing a RecallDataset.
figure_dir — directory for saving figures.
figure_str — base filename for the saved figure. Leave empty to display without saving.
ylim — y-axis limits as a tuple, or None for automatic scaling.
trial_query — a Python expression evaluated against the dataset to select trials.
query_study_position — 0-based study position to track across the recall sequence.
mode — "conditional" or "simple". Conditional divides by availability; simple reports raw probability.
confidence_level — confidence level for subject-wise error bars.