tasks.pavlov module¶
Author: | Dominic Hunt |
---|---|
Reference: | Value and prediction error in medial frontal cortex: integrating the single-unit and systems levels of analysis. Silvetti, M., Seurinck, R., & Verguts, T. (2011). Frontiers in Human Neuroscience, 5(August), 75. doi:10.3389/fnhum.2011.00075 |
-
class
tasks.pavlov.
Pavlov
(rewMag=4, rewProb=array([0.87, 0.33]), stimMag=1, stimDur=20, rewDur=4, simDur=30, stimRepeats=7)[source]¶ Bases:
tasks.taskTemplate.Task
Based on the Silvetti et al 2011 paper “Value and prediction error in medial frontal cortex: integrating the single-unit and systems levels of analysis.”
Many methods are inherited from the tasks.taskTemplate.Task class. Refer to its documentation for missing methods.
-
Name
¶ The name of the class used when recording what has been used.
Type: string
Parameters: - rewMag (float, optional) – The size of the stimulus. Default 4
- rewProb (array of floats, optional) – The probabilities of each stimulus producing a reward. Default [0.85,0.33]
- stimMag (float, optional) – The size of the stimulus. Default 1
- stimDur (int, optional) – The duration, in tens of ms, that the stimulus is produced for. This should be longer than rewDur since rewDur is set to end when stimDur ends. Default 200
- rewDur (int, optional) – The duration, in tens of ms, that the reward is produced for. Default 40
- simDur (int, optional) – The duration, in tens of ms, that each stimulus event is run for. Default 300
- stimRepeats (int, optional) – The number of times a stimulus is introduced. Default 72
-
receiveAction
(action)[source]¶ Receives the next action from the participant
Parameters: action (int or string) – The action taken by the model
-
-
tasks.pavlov.
pavlovStimTemporal
()[source]¶ Passes the pavlov stimuli to models that cope with stimuli and rewards that have a duration.
Returns: pavlovStim – The function expects to be passed an event with three components: (stim,rew,stimDur)``and an action (unused) and yield a series of events ``t,c,r`
.stim
is the value of the stimulus. It is expected to be a list-like object.rew
is a list containing the reward for each trialstep. The reward is expected to be a float.stimDur
is the duration of the stimulus, anint
. This should be less than the length ofrew
.c
the stimulus.r
the reward.t
is the timeReturn type: function -
tasks.pavlov.
Name
¶ The identifier of the function
Type: string
-