AllenNeuralDynamics / dynamic-foraging-task

Bonsai/Harp workflow for Dynamic Foraging with Python GUI for visualization and control
MIT License
5 stars 4 forks source link

Problem in computing foraging efficiency online #272

Open hanhou opened 6 months ago

hanhou commented 6 months ago

When computing foraging efficiency, we should exclude all autowater trials and ignored trials. @XX-Yin

alexpiet commented 6 months ago
hanhou commented 6 months ago

I think it makes more sense to exclude ignored trials because motivation may be orthogonal to their ability to forage, which can be captured by finish_rate and foraging_efficiency_in_finished_trials separately.

XX-Yin commented 6 months ago

I agree to exclude all autowater and ignored trials.

rachelstephlee commented 2 months ago

I can't seem to find where the foraging efficiency is calculated.

I tracked down auto_train_manager, but I sill don't see an online calculation here.

XX-Yin commented 2 months ago

@rachelstephlee It's here https://github.com/AllenNeuralDynamics/dynamic-foraging-task/blob/5120e492cef2c5a4c51b88ad988083bbf8f3527e/src/foraging_gui/MyFunctions.py#L685

hanhou commented 2 months ago

The latest code is here, and here is how I compute it offline.

Although I'm going to move this function to this "basic analysis" shared repo: https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-basic-analysis

rachelstephlee commented 2 months ago

OK. @hanhou if you can let me know once you move the function then I'll fix the bug. I have some other Stan issues that I'll work on in the meantime.

hanhou commented 2 months ago

OK. @hanhou if you can let me know once you move the function then I'll fix the bug. I have some other Stan issues that I'll work on in the meantime.

Yes, I just merged the PR.