[FieldTrip] Error with mutual information

Julian Keil julian.keil at gmail.com
Fri Feb 19 10:19:55 CET 2021


Hi Gian Marco,

did you check which „entropy“-function is called in your analysis?
There is an „entropy“-function in the image processing toolbox, that only takes a single input, so maybe this could be the reason Matlab complains that you are giving too many inputs to your function.

Maybe that helps…

Julian



> Am 19.02.2021 um 09:44 schrieb Gian Marco Duma <gianmarco.duma at unipd.it>:
> 
> In the ft_connectivity_mutualinformation the indication of the data input is 'The input data should be a Nchan x Nobservations matrix'. My data is a classic n-ny-m matlab matrix with the n= number of channels (in my case the vertices of the source) and m= number of time points. I thought that maybe reducing the source vertices (by downsampling to an atlas) could help, but it is not the dimension of my matrix the problem, since I continue to have the same error. 
> That's why I'm not sure where the error comes from.
> best 
> Gian Marco
> 
> Il giorno gio 18 feb 2021 alle ore 15:15 Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl <mailto:jan.schoffelen at donders.ru.nl>> ha scritto:
> Ciao Gianmarco,
> 
> I guess the answer on your question ‘what am I doing wrong’ depends on how you have formatted your Brainstorm-derived data into a structure that fieldtrip can work with.
> If you are working with ft_connectivity_mutualinformation directly, you should study a bit what the required formatting of the input matrix is. Probably the order of the dimensions or the orientation of the matrix is wrong.
> 
> Best wishes,
> Jan-Mathijs
> 
> 
> 
>> On 18 Feb 2021, at 10:57, Gian Marco Duma <gianmarco.duma at unipd.it <mailto:gianmarco.duma at unipd.it>> wrote:
>> 
>> Xavier, thanks for your quick reply. I solved the installation problem, however I have two more questions. I'm not sure how to compute mutual information with the ft_connectivityanalysis function, since I did not find mutual information within the methods section of the function. 
>> The second question is: my data are basically  resting state source activity I extracted from brainstorm with the dimensions 15002 (vertices) x 2000 (time). In the mutualinformation function says 'The input data should be a Nchan x Nobservations matrix'. However, when I try tu run ft_connectivity_mutualinformation I receive the following error:
>> 
>> Error using entropy
>> Too many input arguments.
>> 
>> Error in information (line 501)
>>   [H{:}] = entropy(R, opts, outputOptsList{:});
>> 
>> Error in ft_connectivity_mutualinformation (line 156)
>>           output(k,p,m) = information(R2, opts, 'I'); % this computes mutual information
>> 
>> What am I doing wrong?
>> Thanks
>> 
>> Il giorno gio 18 feb 2021 alle ore 03:13 Xavier Vrijdag <x.vrijdag at auckland.ac.nz <mailto:x.vrijdag at auckland.ac.nz>> ha scritto:
>> HI Gian,
>> 
>>  
>> 
>> I am using the mutual information analysis provided by the IBTB toolbox in fieldtrip.
>> 
>>  
>> 
>> You can check in the fieldtrip/external/ folder if the IBTB folder exists. In my fieldtrip downloads the IBTB toolbox is available. Otherwise you can download it from the fieldtrip github: https://github.com/fieldtrip/fieldtrip/tree/master/external/ibtb <https://github.com/fieldtrip/fieldtrip/tree/master/external/ibtb>
>>  
>> 
>> In general, I can recommend you to use the ft_connectivityanalysis function instead of the lower-level function ft_connectivity_mutualinformation.
>> 
>>  
>> 
>> Regards,
>> 
>>  
>> 
>> Xavier
>> 
>>  
>> 
>> From: fieldtrip <fieldtrip-bounces at science.ru.nl <mailto:fieldtrip-bounces at science.ru.nl>> on behalf of Gian Marco Duma <gianmarco.duma at unipd.it <mailto:gianmarco.duma at unipd.it>>
>> Reply to: FieldTrip discussion list <fieldtrip at science.ru.nl <mailto:fieldtrip at science.ru.nl>>
>> Date: Thursday, 18 February 2021 at 12:14 PM
>> To: "fieldtrip at science.ru.nl <mailto:fieldtrip at science.ru.nl>" <fieldtrip at science.ru.nl <mailto:fieldtrip at science.ru.nl>>
>> Subject: [FieldTrip] Error with mutual information
>> 
>>  
>> 
>> Hi everyone, I'm trying to run mutual information as a measure of functional connectivity. When I run the command  ft_connectivity_mutualinformation I receive the following message 
>> 
>>  
>> 
>> Error using ft_hastoolbox (line 450)
>> the IBTB toolbox is not installed, see http://www.ibtb.org <http://www.ibtb.org/>
>> 
>> Error in ft_connectivity_mutualinformation (line 48)
>> ft_hastoolbox('ibtb', 1);
>> 
>>  
>> 
>> The web site reported in the error line is not active anymore. Therefore I downloaded the ibtb toolbox from the supplementary material of the paper Magri et al. 2009, at the following link
>> 
>> https://link.springer.com/article/10.1186/1471-2202-10-81 <https://link.springer.com/article/10.1186/1471-2202-10-81>
>>  
>> 
>> I installed as usual the toolbox, I decompressed it and I added it to the matlab path as suggested by the installation file. However I continue to receive the same error message.
>> 
>> Do you have any suggestions? 
>> 
>> Thanks
>> 
>>  
>> 
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
>> https://doi.org/10.1371/journal.pcbi.1002202 <https://doi.org/10.1371/journal.pcbi.1002202>
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
>> https://doi.org/10.1371/journal.pcbi.1002202 <https://doi.org/10.1371/journal.pcbi.1002202>
> 
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
> https://doi.org/10.1371/journal.pcbi.1002202 <https://doi.org/10.1371/journal.pcbi.1002202>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210219/94124af6/attachment.htm>


More information about the fieldtrip mailing list