Open alexpiet opened 6 months ago
@hanhou Can you provide @micahwoodard a definition of how to compute bias online?
These two issues might be redundant: I think this issue is one method for computing bias: https://github.com/AllenNeuralDynamics/aind-behavior-blog/issues/314
I think the resolution of this issue is to compute bias, and remove the matching plot: https://github.com/AllenNeuralDynamics/aind-behavior-blog/issues/313
As discussed here, we think we can try two biases, naive bias and logistic regression bias (and remove the old matching bias). But if we choose only one, I would prefer the logistic regression bias, for reasons mentioned earlier in that thread.
Code for naive bias: https://github.com/AllenNeuralDynamics/aind-foraging-behavior-bonsai-basic/blob/5bd0db90bf9182a969bcb3c52af77c8bb9a36f19/code/process_nwbs.py#L317
@micahwoodard
@alexpiet @hanhou the issue says calculate bias online. Are there instances of online calculations elsewhere in the repo or other places? I have not done that before so example code or direction would be helpful
@micahwoodard By "online" we mean after each trial in the GUI as opposed to calculating the bias "offline" after the session is over. So you will just use a normal function in the code repo that executes either in the main thread, or in a separate thread if its slow.
Ohhhhhh okay thank you for that clarification
@alexpiet @hanhou Do you want me to import the logistic regression bias functions in the aind-foraging-behavior-bonsai or just implement the functionality within the foraging repo? I see the the logistic regression function linked takes a nwb file as an argument, and I see that there is a TrasferToNWB py file within the foraging repo, but I'm not seeing where a nwb file is generated or used. Is the idea to generate a nwb based on the GenerateTrials class and then feed that into the logistic regression bias function?
@micahwoodard We want to implement the functionality into the task repo.
TransfertoNWB.py is going to be removed soon.
Okay that makes sense. In the logistic regression bias function, it seems like it cycles through different models from different papers found here. Are we going with a particular model?
I defer to @hanhou on this topic
Let's use Su2022. See this comparison: https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models?tab=readme-ov-file#comparison
@hanhou Do you have an idea what values we should use for the logistic regression function? Right now I am just using all the defaults, but would love input on values to use.
I haven't systematically explored the parameters but I think the default values should be fine.
Steps: