plot_training_trials: Create Animated Plot of Co-Occurrence Matrix from Training...

View source: R/plotting.R

plot_training_trialsR Documentation

Create Animated Plot of Co-Occurrence Matrix from Training Trials

Description

This function takes a sequence of training trials, each consisting of words and objects, and creates an animated plot of the word-object co-occurrence matrix. The plot evolves over each trial, visually representing the accumulation of co-occurrences. The animation is saved to a file if a filename is provided.

Usage

plot_training_trials(train, filename = NULL)

Arguments

train

A list representing the training data, where each element is a trial containing lists of words (words) and objects (objects).

filename

A string specifying the filename where the animation should be saved. If NULL, no file will be saved.

Value

A long-format data frame where each row corresponds to a trial and includes columns for trial number, word, object, and the count of co-occurrences up to that trial.

Examples


plot_training_trials(xsl_datasets[[1]]$train)


XSLmodels documentation built on Oct. 18, 2026, 5:08 p.m.