Wrappers
Monitor-v0
- class neurogym.wrappers.monitor.Monitor(env, folder=None, sv_per=100000, sv_stp='trial', verbose=False, sv_fig=False, num_stps_sv_fig=100, name='', fig_type='png')[source]
Monitor task.
Saves relevant behavioral information: rewards,actions, observations, new trial, ground truth.
- Parameters:
folder – Folder where the data will be saved. (def: None, str) sv_per and sv_stp: Data will be saved every sv_per sv_stp’s. (def: 100000, int)
verbose – Whether to print information about average reward and number of trials. (def: False, bool)
sv_fig – Whether to save a figure of the experiment structure. If True, a figure will be updated every sv_per. (def: False, bool)
num_stps_sv_fig – Number of trial steps to include in the figure. (def: 100, int)
Noise-v0
- class neurogym.wrappers.noise.Noise(env, std_noise=0.1)[source]
Add Gaussian noise to the observations.
- Parameters:
std_noise – Standard deviation of noise. (def: 0.1)
perf_th – If != None, the wrapper will adjust the noise so the mean performance is not larger than perf_th. (def: None, float)
w – Window used to compute the mean performance. (def: 100, int)
step_noise – Step used to increment/decrease std. (def: 0.001, float)
PassReward-v0
PassAction-v0
ReactionTime-v0
SideBias-v0
- class neurogym.wrappers.side_bias.SideBias(env, probs=None, block_dur=200)[source]
Changes the probability of ground truth.
- Parameters:
prob – Specifies probabilities for each choice. Within each block,the probability should sum up to 1. (def: None, numpy array (n_block, n_choices))
block_dur – Number of trials per block. (def: 200, int)
RandomGroundTruth-v0
ScheduleAttr-v0
ScheduleEnvs-v0
- class neurogym.wrappers.block.ScheduleEnvs(envs, schedule, env_input=False)[source]
Schedule environments.
- Parameters:
envs – list of env object
schedule – utils.scheduler.BaseSchedule object
env_input – bool, if True, add scalar inputs indicating current environment. default False.