Skip to content
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

Linear versus dB units #18

Open
DavidBrainard opened this issue Sep 12, 2018 · 6 comments
Open

Linear versus dB units #18

DavidBrainard opened this issue Sep 12, 2018 · 6 comments

Comments

@DavidBrainard
Copy link
Contributor

Query from Roshini Randeniya:

I am new to implementing psychometric staircases but am working with people who have used the Quest functions in Psychtoolbox.
But we are having a bit of trouble translating the functions across and implementing your version to determine the stimulus value for the next trial.

Would you be able to provide some guidance or direct me to someone who would be happy to help?

I have detailed my problem below.

Thank you.
Regards,
Roshini


I am using the Quest core functions in my stimuli script as follows:
questData = qpInitialize('stimParamsDomainList',{[0:80]}, 'psiParamsDomainList',{0:80, 2:5, 0.5, 0:0.01:0.04}); % not sure how to decide the lapse rate

%% for ntrials do following:
% generate a coherence level for the next trial
Coherence = qpQuery(questData);

%generate stimuli & record the paritipant’s response (where 1 is incorrect and 2 in correct)
outcome = getKBresponse();

% update the quest structure
questData = qpUpdate(questData, coherence, outcome(i));

when I use a simulated observer(e.g. attached questtest.m), the stimulus selected for each trial look alright..
But when I use an actual observer in my coherence task(above lines of code), it tends to generate the same stimulus for more than 50% of trials, even though the response is correct for all of them (threshold.jpg).

Maybe I am calling the functions wrong/ not specifying the parameters correctly?

Would appreciate any guidance on implementing this accurately!

@DavidBrainard
Copy link
Contributor Author

I think the issue concerns the translation between linear units of coherence and the fact that qpPFWeibull expects its input in dB. For the stimulus ranges to make sense with this choice of psychometric function, you need to make sure to translate in and out of dB as you go between the QuestPlus functions and your experimental code which I'm guessing works in linear coherence.

I modified your test program to show the translation, attached. I also added a line that illustrates how to use qpPFWeibullInv to get threshold corresponding to any chosen criterion correct. Let me know if this works for you.

If you prefer to use a psychometric function that works directly in linear units, you can write your own and use it instead of qpPFWeibull.
questtestWithDb.m.zip

@ghost
Copy link

ghost commented Sep 14, 2018

Thanks alot David!
This makes sense and I included the dB conversions in my code and conducted the experiment with an actual person (observer).

Below image shows the stimuli values presented per trial (top) using qpQuery, and the recorded response for each trial(bottom). Sorry the plots are rough sketches.
observeroutcome

and below is the qpFit plot(Threshold.jpg) for this data...
threshold

It looks like the stimuli being generated is just one trial per stimulus value and then plateaus around 0.23 coherence...but it doesn't go lower even though the outcome is correct. Can I fix that?
Can I specify some stimuli parameters in the code to generate a few more samples around the expected threshold? To get a better spread of data points for the fitting.

Thanks in advance for your help! :)
Roshini

@DavidBrainard
Copy link
Contributor Author

QUEST is pretty smart, so I'm not immediately persuaded that it is not doing the right thing.
That is, the plot above doesn't look crazy to me.

That said, where QUEST+ puts its trials depends on what parameters you ask it to estimate
The QUEST+ paper, and also qpQuestPlusPaperSimpleExamplesDemo.m, compare the case where you just try to estimate threshold and where you try to estimate more parameters (threshold, slope, etc) of the psychometric function. It will do different things in these two cases. If you think you know the slope of the psychometric function then you can just lock that
down by making the range a single number, for example. Similarly with the lapse rate.
(If you make it try to estimate the lapse rate, it's going to need to put trials up at high
coherence to estimate this.)

In the end, what you care about are how reliable your threshold estimates are. What I like
to do is do multiple runs and get the threshold from each. Then take the mean and
standard error of the individual run values. If the standard errors are small, then you
have your system working well.

@ghost
Copy link

ghost commented Sep 17, 2018

Thanks David, I agree the stimuli presented using qpQuery are looking alright. I don't know the lapse rate and slope to keep them fixed. Yes in the end I care about getting good threshold estimates.

Right now my worry is that it is not sampling enough around the lower coherence values..so the psychometric plot cant make a good fit?

But maybe if I adjust the stimuli ranges when specifying I can get more sampling at the end as well?

Some plots from another session:

t1

t1

@DavidBrainard
Copy link
Contributor Author

An important thing to understand about QUEST+ (and QUEST, and most adaptive methods) is that they assume that the parametric form of the psychometric function is known and then optimize trial placement to optimize information gained about the parameter values. So, in general, they are not going to sample the whole psychometric function. As an example, the Weibull you are using has its guess rate locked at 50%, so the method is not going to put any trials down at very low contrasts, because it already "knows" that performance is 50% for those values.

If you are unsure whether a Weibull is a good choice of psychometric function and want to put points at many stimulus values to test this, then QUEST+ in its vanilla form is not going to do this for you. You could i) use the method of constant stimuli, ii) design a more general psychometric function (more parameters) so that to determine those parameters QUEST+ needs to spread points out more, or iii) modify the psychometric function so that it takes one more parameter which is the target %correct for the threshold parameter, and then interleave QUEST+ staircases each of which is seeking to determine a different target percent correct. Note that these will be less efficient than vanilla QUEST+ in placing trials to determine threshold at a particular desired percent correct, if the Weibull is in fact the right parametric form.

@ghost
Copy link

ghost commented Sep 17, 2018

Thanks alot for your advice David!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant