int-brain-lab / iblrig

Main repository for IBL rig code
https://int-brain-lab.github.io/iblrig/
MIT License
22 stars 21 forks source link

Debiasing not active on training phase 4? #536

Open samupicard opened 1 year ago

samupicard commented 1 year ago

We have put a mouse from training phase 5 back to 4 in the hope that the debiasing protocol would help correct for a persistent bias in the PM curve. However I just noticed that the « repeat on error » rule doesn’t seem to apply: after an error on the 100% contrast a different contrast is presented. I checked the task_parameters in _iblrig_tasks_trainingChoiceWorld and ‘DEBIAS’ : True . Any clue what might be going on?

This was noticed on 2023-10-26 in SP046 IMG_9378

samupicard commented 1 year ago

I don't know whether this is related, but looking into the distribution of trials per contrast and it doesn't look like a uniform distribution. I don't think this makes sense under my interpretation of the debiasing protocol: image

oliche commented 1 year ago

Yes we have this in the tests as well

trials_table.groupby(['contrast'])['trial_correct'].count()
Out[2]: 
contrast
0.0000     87
0.0625    164
0.1250    175
0.2500    182
0.5000     35
1.0000    156
Name: trial_correct, dtype: int64

Investigating the cause

samupicard commented 1 year ago

Ah, I see, when you manually put an animal on training phase 4 the training phase progression criteria still apply (so if the mouse completes 200 trials it will automatically move to phase 5). I wasn't aware of this and would prefer if this weren't the case, but I guess this has to be discussed. image

Still doesn't explain the original issue though?

oliche commented 1 year ago

It does explain the issue... The distribution is skewed because it switches to phase 5 at trial 200.

And the debias is removed as well.

@GaelleChapuis this indeed a bit weird, should we move on to the next phase only on the next session ?

@samupicard iblrig_tasks_trainingPhaseChoiceWorld won't budge from its training level

samupicard commented 1 year ago

@oliche @bimac automated extraction for iblrig_tasks_trainingPhaseChoiceWorld isn't working atm, despite the fact that the standard extractors are written into the task Is this a code bug or is something wrong on my end?