ANNUBS / annubes

ANNUBeS: training Artificial Neural Networks to Uncover Behavioral Strategies in neuroscience
https://annubs.github.io/annubes/
Apache License 2.0
2 stars 0 forks source link

refactor: `_build_trials_seq` #71

Closed DaniBodor closed 6 months ago

DaniBodor commented 7 months ago

fix: #29

DaniBodor commented 7 months ago

@gcroci2 , I now fixed the bugs that I introduced, so it's ready to review. You can do it one commit at a time, there is little to no overlap between them and they follow a logical order.

DaniBodor commented 7 months ago

I've addressed all your points.

Note that I've also made a substantial change to the logic since your review in 57d2ae0. I realized that the redraw until you get the correct item algorithm is suboptimal: 1) it allows for fails (even if realistic only for "extreme" settings), 2) it requires additional input params to deal with point 1, and 3) it requires more random draws than needed. In the new algorithm, when the max sequential is reached, the probability for that option is set to 0 pre-emptively, so there is always just 1 draw made and it becomes impossible to exceed the max_sequential. I'm also now testing this algorithm on a wider variety of settings in deb0698

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
94.6% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud