{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Create a multisubject egg\n\nAn egg is made up of two primary pieces of data: `pres`, which are the\nwords/stimuli that were presented to a subject and `rec`, which are the\nwords/stimuli that were recalled by the subject.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Code source: Contextual Dynamics Laboratory\n# License: MIT\n\nimport quail\nimport numpy as np\n\n# presented words\npresented_words = [[['cat', 'bat', 'hat', 'goat'],['zoo', 'animal', 'zebra', 'horse']],[['cat', 'bat', 'hat', 'goat'],['zoo', 'animal', 'zebra', 'horse']]]\n\n# recalled words\nrecalled_words = [[['bat', 'cat', 'goat', 'hat'],['animal', 'horse', 'zoo']],[['bat', 'cat', 'goat'],['animal', 'horse']]]\n\n# create egg\negg = quail.Egg(pres=presented_words, rec=recalled_words)\n\n# analyze and plot\nfegg = egg.analyze('accuracy')\n\nfegg.plot(plot_style='violin', title='Average Recall Accuracy')" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.12" } }, "nbformat": 4, "nbformat_minor": 0 }