# [FieldTrip] Different way of calculating the covariance for LCM

Yuval Harpaz yuvharpaz at gmail.com
Tue Mar 22 10:55:07 CET 2011

```So just run the commands on an unaveraged dataset.

Another option to consider is the one used by Dr. Robinson when performing
SAMerf (we have his tool here <http://yuval-harpaz.github.com/SAM_BIU/>,
works for our 4D machine).
The idea is to calculate the covariance on all trials, calculate weights by
this covariance (keep filter in LCMV) and then apply these weights on the
averaged data. I found it useful because the covariance is better for longer
datasets, and the averaging in the end increases the signal to noise ratio.
I do not know exactly how to do it in fieldtrip.

>  Dear Yuval,
>
> I have to admit that I did not look at the matlab routines.
> In item 2 I suppose that the covariance is calculated for each trial then
> averaged. In item 3 I would like to calculate the covariance from all the
> signal (the trials being concatenated).
>
> Jean-Michel
>
> Le 22/03/11 05:47, Yuval Harpaz a écrit :
>
> Dear Jean Michel
> As far as I know you can do it on an averaged data structure (item 1) or do
> the same with the data structure before averaging (3). I did not understand
> what you meant by 2.
>
>  Yuval
>
>
>>  Dear fieldtrip users,
>>
>> There are different ways of estimating the covariance for LCMV
>> calculation.
>> If I am correct:
>>
>> 1. As suggested in one of the tutorial one can apply the calculation of
>> the covariance directly on the average data (for the different periods of
>> interest that are at least a base line and the period of interest).
>>
>> 2. Estimate the covariance from the average of the covariance rather than
>> the covariance of the average using cfg.keeptrials = "yes"
>>
>> 3. Estimate the covariance from the whole trials concatenated together.
>> Is there an easy way to do that in fieldtrip (beside create a new data set
>> of one trial constituted of all the trials)?
>>
>> Thanks
>>
>> Jean-Michel
>>
>>  Laboratoire de MagnétoEncéphaloGraphie INSERM U751. Aix
>> Marseille Université 33 (0)4 91 38 55 62  *jean-michel.badier at univmed.fr*<jean-michel.badier at univmed.fr>
>>  Service de Neurophysiologie Clinique. CHU Timone 264 Rue
>> Saint-Pierre, 13005 Marseille-France
>>
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
>
>
> --
> Y.Harpaz
>
> a link to the BIU MEG lab:
> http://faculty.biu.ac.il/~goldsa/index.html
>
>   " Why, Dan," ask the people in Artificial Intelligence, "do you waste
> your time conferring with those neuroscientists? They wave their hands about
> information  processing and worry about where it happens, and
> which neurotransmitters are  involved, and all those boring facts, but
> they haven't a clue about the computational requirements of higher
> cognitive functions."  "Why," ask the neuroscientists, "do you waste your
> time on the fantasies of Artificial Intelligence? They just invent
> whatever machinery they want, and say unpardonably ignorant things about the
> brain." The  cognitive psychologists, meanwhile, are accused of concocting
> models with neither biological plausibility nor proven computational powers;
> the anthropologists wouldn't know a model if they saw one, and the
> philosophers, as we all know, just take in each other's laundry, warning
> about confusions they themselves have created, in an arena bereft of both
> data and empirically testable theories. With so many idiots working on the
> problem, no wonder consciousness is still a mystery.* Philosopher Daniel
> Dennet, consciousness explained, pp. 225*
>
>
> _______________________________________________
> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>

--
Y.Harpaz

a link to the BIU MEG lab:
http://faculty.biu.ac.il/~goldsa/index.html

" Why, Dan," ask the people in Artificial Intelligence, "do you waste your
time conferring with those neuroscientists? They wave their hands about
information  processing and worry about where it happens, and
which neurotransmitters are  involved, and all those boring facts, but
they haven't a clue about the computational requirements of higher
cognitive functions."  "Why," ask the neuroscientists, "do you waste your
time on the fantasies of Artificial Intelligence? They just invent
whatever machinery they want, and say unpardonably ignorant things about the
brain." The  cognitive psychologists, meanwhile, are accused of concocting
models with neither biological plausibility nor proven computational powers;
the anthropologists wouldn't know a model if they saw one, and the
philosophers, as we all know, just take in each other's laundry, warning
about confusions they themselves have created, in an arena bereft of both
data and empirically testable theories. With so many idiots working on the
problem, no wonder consciousness is still a mystery.* Philosopher Daniel
Dennet, consciousness explained, pp. 225*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110322/86bcc4e8/attachment-0002.html>
```