[FieldTrip] Problem in ft_timelockstatistics() phase

Sander Maijers S.N.Maijers at student.ru.nl
Sat May 5 11:54:25 CEST 2012


Hi Irina,

Thank you for your solution!

I changed the code as per your suggestion, and other shortcomings too. It works correctly now.

I will start working further on the experiment (correcting the remaining issues, and expand its scope a bit I hope). I will ask you if I have questions.

I was aware of the DMLT effort, and I had installed it already. Perhaps I am mistaken, but I could not find clear guidance about the transition between the old FieldTrip function names and the the new DMLT names.

Thanks for your help and dedication.

Best,
Sander


On Thu, 3 May 2012 16:43:08 +0200
"Irina Simanova" <irina.simanova at mpi.nl> wrote:

> Hi Sander,
> 
> The multivariate analysis module is now being re-structured, so that
> it will eventually become a stand-alone toolbox - Donders Machine
> Learning Toolbox, DMLT. Your error is caused by a conflict between
> the old and the new versions of the functions. You should just change
> the way you specify the mva method: cfg.mva = {dml.standardizer
> dml.svm} (check the reference to ft_statistics_crossvalidate)
> It should work then.
> 
> Best,
> Irina 
> 
> -----Original Message-----
> From: fieldtrip-bounces at donders.ru.nl
> [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Sander Maijers
> Sent: Saturday, April 28, 2012 4:01 PM
> To: fieldtrip at donders.ru.nl
> Subject: [FieldTrip] Problem in ft_timelockstatistics() phase
> 
> Hi,
> 
> I am trying to rework a small FieldTrip experiment I did last year
> (reproduction of larger experiment done by Irina Simanova).
> 
> Calling ft_timelockstatistics() on two ERP data partitions results in
> an error: "Undefined function 'fieldnames' for input arguments of
> type 'cell'." I'm running FieldTrip under MATLAB R2011b 64-bit on
> Linux.
> 
> I see a possible cause of the problem, in that these data we
> pre-analysed with ft_timelockanalysis() a year ago, or longer. I read
> them from parts of the data set I was supplied with. Maybe there have
> been breaking changes to this function in the meantime? The cfg
> struct that I pass as parameter seems in line with the current
> documentation, though.
> 
> 
> LOG:
> 
> >> main()
> 
> data_set_location =
> 
> /media/SAMSUNG/0,data_set/EEG/0 MATLAB
> 
> 
> output_dir =
> 
> /tmp/EEG
> 
> Data set part file: timelock10_lp
> Data set part file: timelock11_lp
> 
> CONTRAST
> [class 1, size = 220]: participant timelock10_lp on condition
> avg_anm_aud_lp [class 2, size = 224]: participant timelock10_lp on
> condition avg_tls_aud_lp cfg
>      method: 'crossvalidate'
>     latency: [0 0.7000]
>     channel: {1x60 cell}
>      nfolds: 5
>         mva: {2x1 cell}
>      design: [444x1 double]
> 
> class_1_data__struct
>         avg: [62x501 double]
>         var: [62x501 double]
>     fsample: 500
>        time: [1x501 double]
>         dof: [62x501 double]
>       label: {62x1 cell}
>       trial: [220x62x501 double]
>      dimord: 'rpt_chan_time'
>         cfg: [1x1 struct]
> 
> class_2_data__struct
>         avg: [62x501 double]
>         var: [62x501 double]
>     fsample: 500
>        time: [1x501 double]
>         dof: [62x501 double]
>       label: {62x1 cell}
>       trial: [224x62x501 double]
>      dimord: 'rpt_chan_time'
>         cfg: [1x1 struct]
> 
> selected 60 channels
> selected 351 time bins
> selected 1 frequency bins
> using "ft_statistics_crossvalidate" for the statistical testing fixing
> random number generator for reproducibility creating sample indices
> using 5-fold cross-validation validating fold 1 of 5 for 1 datasets
> validating fold 2 of 5 for 1 datasets validating fold 3 of 5 for 1
> datasets validating fold 4 of 5 for 1 datasets validating fold 5 of 5
> for 1 datasets Undefined function 'fieldnames' for input arguments of
> type 'cell'.
> 
> Error in ft_statistics_crossvalidate (line 84) fn =
> fieldnames(stat.model{1});
> 
> Error in statistics_wrapper (line 298)
>     [stat] = statmethod(cfg, dat, design);
> 
> Error in ft_timelockstatistics (line 110) [stat, cfg] =
> statistics_wrapper(cfg, varargin{:});
> 
> Error in main/modeling (line 203)
>         stat = ft_timelockstatistics(cfg, class_1_datastruct,
> class_2_datastruct);
> 
> Error in main/statistics (line 225)
>             stat = modeling(data_set, method, obj_class_1_and_2);
> 
> Error in main/ERP_experiment (line 374)
>             stats = statistics(data_set, contrasts, method);
> 
> Error in main (line 401)
>     stats_x = ERP_experiment(data_set_location, 'RR', output_dir)
> 
> 
> Any suggestions would be welcom!
> 
> Kind regards,
> Sander Maijers
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



More information about the fieldtrip mailing list