Multiple targets with P300

Forum for software developers to discuss BCI2000 software development
Locked
ilegue
Posts: 2
Joined: 14 Apr 2011, 11:45

Multiple targets with P300

Post by ilegue » 25 Sep 2011, 11:54

We are conducting the following experiment: the user is presented with a sequence of pictures, from which we would like to select all the ones that evoked a P300 component. No specific instructions are given to the user with regards to what to pay attention to.
Bearing in mind that we don't know in advance the number of images that would be targeted by the user, is there a way to return all the targets which likelyhood ratios are over a certain threshold?
We are not sure as to where to begin the code modifications. Could that be in TargetClassification::MostLikelyTarget or StimulusPresentationTask::OnClassResult?
We need this for a project that has to be finished in less than 3 weeks from now, so: Please help!!! Many, many thanks in advance for your help! (Does this sound desperate enough :) ?)

mellinger
Posts: 1052
Joined: 12 Feb 2003, 11:06

Re: Multiple targets with P300

Post by mellinger » 26 Sep 2011, 08:25

Hi,

the answer to this question very much depends on what you want to do with the resulting set of targets. Do you need this for offline analysis? Or do you want to give feedback about all those targets to the user? Or do you want to do keep the information for further processing, e.g. by choosing a "second best" target if the user indicates that the original selection was not the intended one?

Juergen

ilegue
Posts: 2
Joined: 14 Apr 2011, 11:45

Re: Multiple targets with P300

Post by ilegue » 26 Sep 2011, 09:35

Hi Juergen,
Thanks for your reply. Basically what we want to do is just create a subset of all images that have been targeted, import this subset as separate frames in Adobe Premiere and show the resulting videoclip to the user (yes, these are the first steps towards a tool for visual artists :) ). So it would be great if one way or another all targeted images automatically are dumped into/ duplicated to a separate folder.
It might be that when we find out that the results of the first version of our tool go nowhere (for instance because the subset of targeted images is too small to make a videoclip), we would like to do some further processing, for instance change the treshhold.
Please let us know if you need any further information. Inger & Adriana.

mellinger
Posts: 1052
Joined: 12 Feb 2003, 11:06

Re: Multiple targets with P300

Post by mellinger » 26 Sep 2011, 11:15

Hi,

that sounds quite interesting. As I understand from what you write, you don't really need to process information about those targets further in the online system, just dump it somewhere and use it to create that video.

My suggestion would be to modify AssociationMap::ClassifyTargets() such that it dumps each target's final score into a text file where it may be picked up by your own program, which might be a Windows script, or a Premiere macro. You might add something like

Code: Select all

ofstream file( "myFileName.txt" );
for( TargetClassification::iterator i = result.begin(); i != result.end(); ++i )
  file << i->first->Tag() << "\t" << i->second << "\n";
before line 248 in src/shared/modules/application/stimuli/Association.cpp (r3429).

Operating on targets rather than stimuli, this would cover both the StimulusPresentation, and the P3Speller applications. In the P3Speller, stimuli are rows and columns, while matrix elements are targets; in the StimulusPresentation, stimuli and targets are identical, but you can make them different by defining, e.g. combinations of targets into "Associations" which are then presented as stimuli.

Choosing an absolute threshold would require to modify classifier training such that it outputs classification scores for its training data. You might consider using a clustering algorithm such as k-means to sort scores into "selected" and "non-selected" without referring to an absolute threshold value.

Regards,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 2 guests