| Reference | Downloads | Github

Correct use of StopInterval in QuestHandler


Hi everybody,

I’m trying to use the questHandler with the stopInterval termination rules. I read the doc of the QuestHandler class but I can’t understand what does it mean :

stopInterval: None or a number
The minimum 5-95% confidence interval required in the threshold estimate before stopping. If both this and nTrials is specified, whichever happens first will determine when Quest will stop.

In my current test I have images with a level of noise between 0 and 1 and I use the QuestHandler object like this :

staircase = data.QuestHandler(0.5, 0.5, pThreshold=0.51, stopInterval=0.01, delta=0.01, beta=3.5, gamma=0.1, minVal=0.0025, maxVal=1, nTrials=30)

In this line I choose stopInterval randomly and it stop in 30 trials. I don’t now how to calculate the correct value in order to have a 95% confidence level.

I also checked the code of the questHandler class and I saw that they compare the result of the confInterval() function and the value of stopInterval. The experience stop if confInterval() < stopInterval.
So I print my values of confInterval() during my experience and the values are between 0.22 at the beginning and 0.13 after 30 trials.

Do you have any ideas how to calculate stopInterval in order to have a 95% confidence level?