how create file.loc

Locked
Alberto88
Posts: 23
Joined: 04 May 2014, 09:22

how create file.loc

Post by Alberto88 » 03 Jun 2014, 09:50

hi I'm supposed to import the file. eeglab dat, after doing the import and scroll me error saying First argument must be single or double.
Maybe I have to import the file loc before? Bci2000 but I did not created it, how do you create?

i try to create file in float32 and eeglab managed to make me scroll but instead ica not run from this error undefined function or method 'rng' for input arguments type 'char' what is it?...

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: how create file.loc

Post by boulay » 03 Jun 2014, 11:05

The electrode locations depend on your EEG cap.
Please do the EEGLAB tutorial.

Alberto88
Posts: 23
Joined: 04 May 2014, 09:22

Re: how create file.loc

Post by Alberto88 » 03 Jun 2014, 18:03

But the error of eeglab is because don't have import o set the channel locations??
Why eeglab don t run ica ??
The file.dat is with 16 channel float32 create with signalgenerator and load the parameter of example in bci2000.
The cluster is correct i verified with the example in the tutorial...
Where is the problem??

Alberto88
Posts: 23
Joined: 04 May 2014, 09:22

Re: how create file.loc

Post by Alberto88 » 04 Jun 2014, 18:13

Help?

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: how create file.loc

Post by boulay » 04 Jun 2014, 22:54

I'm sorry I don't understand your problem.

Please copy&paste your matlab code, or the exact sequence of buttons you click. Please copy & paste the error or take a screen shot of the error and attach it here.

Alberto88
Posts: 23
Joined: 04 May 2014, 09:22

Re: how create file.loc

Post by Alberto88 » 05 Jun 2014, 05:23

i create a file.dat in bci2000 in float32
I open eeglab
Click file-importdata-using eeglab functions and plugins - from bci2000 DAT file
What does the window select event?
i choose StimulusCodeRes
after i click edit- channel locations - cancel - in the window edit channel info i click read locations and import a file.loc modified with my 16 channels with the position - press ok
after i click tools-runIca- chose runica- click channels and select all 16 label and press ok but display this error

the file.loc is this
1 -90.0000 0.2030 C3..
2 90.0000 0.2030 C4..
3 -60.0000 0.2190 Fc3.
4 60.0000 0.2190 Fc4.
5 -120.0000 0.2190 Cp3.
6 120.0000 0.2190 Cp4.
7 -90.0000 0.4060 T7..
8 90.0000 0.4060 T8..
9 -72.0000 0.4060 Ft7.
10 72.0000 0.4060 Ft8.
11 0.0000 0.0000 Cz..
12 180.0000 0.1810 Pz..
13 -35.0000 0.2750 F3..
14 35.0000 0.2750 F4..
15 -145.0000 0.2750 P3..
16 145.0000 0.2750 P4..


i take this position from i file.loc in the examplefiles of bci2000, and i copy only the channel that i use


i try to install a new version of matlab becaus a function rng is not present in my installation folder.....

error fixed the problem is a version of matlab....thank you
Attachments
Immagine.png

Alberto88
Posts: 23
Joined: 04 May 2014, 09:22

Re: how create file.loc

Post by Alberto88 » 06 Jun 2014, 08:11

an information, unfortunately we have only 16 channels, to perform a proper analysis of independent components with 10 flashes, how many sessions calibration should we do? with 10 samples per session, 10 sessions are going well?

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: how create file.loc

Post by boulay » 06 Jun 2014, 09:14

Can you please define what you mean by 'session' and 'calibration'?

Alberto88
Posts: 23
Joined: 04 May 2014, 09:22

Re: how create file.loc

Post by Alberto88 » 07 Jun 2014, 09:53

we want to determine the feature needed for two dimensional movement (LEFT RIGHT) and so we're going to do a calibration session in which a left arrow appear on the screen for 10 times while subject is doing the corrisponding movement. Is the number of stimuli for each feature enough to determine the frequency and the location of Mu rythm? by now we're using 10 stimuli for each feature
in total how many stimuli would serve to have a good division of independent components and visulizzare to best remove artifacts? always with only 16 channels

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: how create file.loc

Post by boulay » 08 Jun 2014, 20:52

You say your arrow appears 10 times, but you don't say for how long each time. About 6 s is typical for this kind of experiment. So I guess you have about 2 minutes of task data, and about the same amount of time of rest data (in between arrow presentations). What is your sampling rate?

For ICA, the absolute minimum number of samples is N^2, where N is the number of channels. For you, this is 16^2 = 256 samples. For EEG, you'll typically want to sample at 256 Hz or higher. This means the minimum data is 1 s total. However, I recommend you get at least 10x(N^2).

As for figuring out how much data you need for discriminating left vs right, well that depends on a lot of factors. If your signal is excellent, if you know a priori which signal features are useful, if your subject happens to have excellent lateralization of their SMR, and if your subject has great desynchronization of their SMR, then you can classify these data with only a few trials of training data. However, if one of these things is not true (usually more than 1 is not true) then you'll need a lot more data.

For most classification problems it is suggested you have 10x as many observations as you have features to avoid over-fitting. E.g., if you have 16 channels * 40 frequencies (640 features) then you'll need 6400 observations (usually one trial is one observation). If you pick your "channel" (or IC) and frequency ahead of time then can you get by with 10 trials. Most of the time we don't know exactly which channel/IC is best or which frequency is best for an individual subject so we need to include more features in our model. In this case it is unrealistic to get as much data as needed. Instead, you'll have to use regularized methods or other methods that protect against over-fitting.

So I can't tell you how much data you need, but I can tell you that many labs use ~40 trials per condition when building an initial classifier then fewer trials on subsequent sessions when updating the classifier. This takes a long time to collect. Many people have worked on the problem of building a classifier with less calibration data so you should try to search for those papers.

Alberto88
Posts: 23
Joined: 04 May 2014, 09:22

Re: how create file.loc

Post by Alberto88 » 09 Jun 2014, 04:57

thanks for the information, now I will try to create a training with 40 samples per signal to 6 seconds thanks again

Alberto88
Posts: 23
Joined: 04 May 2014, 09:22

Re: how create file.loc

Post by Alberto88 » 12 Jun 2014, 11:11

I picked up a total of 65 samples for the movement of the right hand and 58 samples for the movement of the left hand, total 120 samples for about 16 channels.
I imported file.dat in eeglab, I selected all the events at this point I made a basic FIR filter with the filter first with lower edge edge higher after 1 HZ and 40 HZ.
at this point according to the steps suggested by various tutorials for removing artifacts should divididere all the imported file in court eras.
My question is, up to this point is quite correct procedure?
in how many times it is better divididere the file?
I put the picture of my imported file and changed up to this time

i click in exctract epochs and leaving the default values ​​I got 490 epochs, I have not applied the elimination of baseline ..... click cancel to the next window ..
What is the baseline?
Attachments
Cattu.PNG

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: how create file.loc

Post by boulay » 13 Jun 2014, 22:06

When you extract epochs, you should be sure to include some time before the event. For example, you may want to use -4 to +4 seconds around the stimulus code. The baseline is the pre-event period in the epoch (-4 to 0). If you filtered your data with a 1 Hz highpass then your pre-stimulus (i.e., baseline) should have a mean of 0, but you could subtract the average of the baseline from the entire trial anyway. It shouldn't matter in your situation.

These questions are specific to EEGLAB and probably belong on their mailing list. Search their archive before asking on the mailing list. There are hundreds to thousands of messages per year; many more than here. It is likely your question has already been answered several times.

Alberto88
Posts: 23
Joined: 04 May 2014, 09:22

Re: how create file.loc

Post by Alberto88 » 14 Jun 2014, 11:32

ok thank you

Locked

Who is online

Users browsing this forum: No registered users and 12 guests