SingleContextDecisionMaking#
- class braintools.cogtask.SingleContextDecisionMaking(t_fixation=Quantity(300., 'ms'), t_stimulus=Quantity(750., 'ms'), t_response=Quantity(100., 'ms'), context=0, num_choices=2, coherences=(6.4, 12.8, 25.6, 51.2), noise_sigma=Quantity(1., 'ms^0.5'), pop_per_choice=4, **kwargs)[source]#
Single-Context Decision Making task.
Fixed context version of ContextDecisionMaking - agent always attends to the same modality.
Structure: Fixation >> Stimulus >> Response
- Parameters:
t_fixation (
Quantity) – Fixation duration (default: 300ms).t_stimulus (
Quantity) – Stimulus duration (default: 750ms).t_response (
Quantity) – Response duration (default: 100ms).context (
int) – Which context/modality to use (0 or 1) (default: 0).num_choices (
int) – Number of choices (default: 2).coherences (
Sequence[float]) – Coherence levels (default: (6.4, 12.8, 25.6, 51.2)).noise_sigma (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Stimulus noise (default: 1.0 * u.ms**0.5).seed (int, optional) – Random seed.
Examples
>>> import brainunit as u >>> import braintools >>> task = braintools.cogtask.SingleContextDecisionMaking( ... context=0, seed=0, dt=10.0 * u.ms) >>> task.num_inputs, task.num_outputs (17, 3) >>> X, Y, info = task.sample_trial(0) >>> X.shape, Y.shape ((115, 17), (115,)) >>> >>> X, Y = task.batch_sample(4) # time-first: (T, batch, features) >>> X.shape, Y.shape ((115, 4, 17), (115, 4))
- define_features()[source]#
Define input and output features.
Override in subclass for class-based task definition.
- Return type:
- Returns:
input_features (Feature or FeatureSet) – Input feature definitions.
output_features (Feature or FeatureSet) – Output feature definitions.