New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NF: Add fullRandom method to MultiStairHandler #2659
Conversation
`MultiStairHandler` now supports a `fullRandom` randomization method. We do this by sampling with replacement from the list of all running staircases on each "pass". To make this testable, I also added a `randomSeed` kwarg to `MultiStairHandler`, which is used to seed a `np.random.RandomState` RNG. All randomization operations are then being done through that object. Closes GH-2635.
So the tests fail because my changes actually exposed another bug in the previous implementation. The Previously, psychopy/psychopy/data/staircase.py Lines 1869 to 1877 in fc51f9e
|
Ideally, all kwargs that need to be passed down to the invoked staircase handlers would be passed as a separate dict, e.g., MultiStairHandler(stairType='quest', method='fullRandom',
stairParams=dict(method='quantile')) |
Never mind, we already do that via |
Codecov Report
@@ Coverage Diff @@
## master #2659 +/- ##
==========================================
- Coverage 44.28% 44.28% -0.01%
==========================================
Files 235 235
Lines 42196 42205 +9
Branches 7287 7289 +2
==========================================
+ Hits 18687 18690 +3
- Misses 21524 21534 +10
+ Partials 1985 1981 -4
Continue to review full report at Codecov.
|
MultiStairHandler
now supports afullRandom
randomization method. We do this by sampling with replacement from the list of all running staircases on each "pass".To make this testable, I also added a
randomSeed
kwarg toMultiStairHandler
, which is used to seed anp.random.RandomState
RNG. All randomization operations are then being done through that object.Closes GH-2635.