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(trials, fname = "")

Arguments

trials

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

fname

A string specifying the filename where the animation should be saved. If left as an empty string (”), 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.


kachergis/XSLmodels documentation built on Feb. 25, 2024, 10:43 p.m.