Repetition SRAC

Measure serial recall accuracy at repeated-item positions, broken down by presentation index.

The repetition-index SRAC reports recall accuracy at study positions occupied by repeated items, split by whether the position is the item’s first, second, or later occurrence. This reveals how the benefit of repetition distributes across presentations.

Workflow

Code
import os
import matplotlib.pyplot as plt
import warnings
from jaxcmr.analyses.repsrac import plot_repsrac
from jaxcmr.helpers import find_project_root, generate_trial_mask, load_data, save_figure

warnings.filterwarnings("ignore")
Code
data_path = "data/LohnasKahana2014.h5"
figure_dir = "results/figures"
figure_str = ""
ylim = None
mixed_trial_query = 'data["list_type"] > 2'
size = 2
Code
project_root = find_project_root()
figure_dir = os.path.join(project_root, figure_dir)
data_path = os.path.join(project_root, data_path)
data = load_data(data_path)
trial_mask = generate_trial_mask(data, mixed_trial_query)
Code
plot_repsrac(data, trial_mask, size=size)
if ylim is not None:
    for ax in plt.gcf().axes:
        ax.set_ylim(ylim)
save_figure(figure_dir, figure_str)

Interpretation

Each curve shows recall accuracy across study positions for a given presentation index.

  • Second presentation > first: repetition boosts recall, with the benefit concentrated at the later occurrence.
  • Similar curves: both presentations contribute equally to recall accuracy.

API Details

Notebook parameters

  • data_path — path to an HDF5 file containing a RecallDataset with repeated items.
  • 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.
  • mixed_trial_query — selects trials containing repeated items.
  • size — maximum number of study positions a single item can occupy.