Demo 1: Raw Rankings → Detailed Choice File
This demo converts raw ranking responses collected using the Waraich & Victor paradigm into a detailed choice file.
Run the demo
From the terminal:
Inputs
The demo will prompt you for the following:
| Prompt | What the parameter is |
|---|---|
| Path to subject data | Folder containing raw response CSV files from the Waraich and Victor paradigm |
| Output directory | Directory where any output files will be written |
| Experiment/paradigm name | Name of the condition or experiment. It is used when naming output files |
| Subject ID | Subject identifier, used when naming output files |
| Judgment type | triadic or tetradic (see Notes on Comparison Formats |
| Total number of trials | Stored as metadata |
| Total number of sessions | Stored as metadata |
To use the sample data included with the repository, enter:
for all prompts.
What the user sees
The script will display the following prompts:
Path to subject data:
Output directory:
Experiment/paradigm name (for output filename):
Subject ID (for output filename):
Judgment type: (triadic or tetradic)
For metadata
provide total number of trials (optional):
For metadata
provide total number of sessions (optional):
Example terminal output
Processing raw data...
Input directory: /path/to/S4
Output directory: /path/to/output
Subject: S4
Experiment: animals
Types of judgments: triadic
Saved results to /path/to/output/animals_detailed_choices_S4.mat
Done.
Output file
Contents of the output file
The file contains three fields:
metadata
Information describing the dataset:
subject = S4
exp_name = animals
num_trials = 1110
num_sessions = 10
judgment_type = triadic
stim_list = [...]
responses_colnames
responses
For the sample dataset:
Each row represents a single triadic comparison derived from a ranking response.
Example:
The first column indicates the trial from which the comparison originated. In this example, both rows come from trial 1.
The stimulus IDs correspond to entries in:
In this example, the stimulus IDs correspond to these stimuli:
Thus the first row corresponds to the comparison:
The participant's response of 1 indicates that they considered 'giraffe' to be more similar 'elephant' than to 'bear.' In other words, when asked to click the most similar stimulus to 'giraffe', they clicked on 'elephant' before clicking on 'bear'.To determine the name associated with any stimulus ID, look it up in:
within the same file.
The output of this demo becomes the input to Demo 2, which aggregates repeated occurrences of the same comparison across trials and sessions.
Next step
The output of Demo 1 becomes the input to Demo 2, which aggregates repeated occurrences of the same comparison across trials and sessions.
Notes on Comparison Formats
The Waraich & Victor paradigm produces triadic judgments, in which two stimuli are compared relative to a common reference:
The same judgment can be stored in two formats.Triadic format (recommended)
(ref, A, B)
Example:
(cat, dog, wolf)
corresponding to:
D(cat,dog) > D(cat,wolf)
This format is more compact and is the format used in the Waraich & Victor studies.
Tetradic format
(ref, A, ref, B)
Example:
(cat, dog, cat, wolf)
corresponding to:
D(cat,dog) > D(cat,wolf)
This contains the same information, but represents the judgment as a comparison between two stimulus pairs.
Which should I choose?
For most users, we recommend choosing triadic. Choose tetradic only if your downstream analysis expects comparisons between stimulus pairs or you need compatibility with another tetradic dataset.