[FieldTrip] Problem in ft_timelockstatistics() phase

Sander Maijers S.N.Maijers at student.ru.nl
Tue May 1 20:03:20 CEST 2012


Hi Irina,

Nice to hear from you again! I will get back in touch with you once I've made enough preparations to redo my experiment. :)

I was using the latest version from the source code repository at http://code.google.com/p/fieldtrip/ .
I just updated it (to revision 5718), but the error remains.

The source code and output for my current experiment script is at http://pastebin.com/zjXKFE0N . (This link will remain active for a day or so.)

I intend to convert the experiment script to the new Donders Machine Learning Toolkit, if that is the best way to go forward.

Hopefully someone knows what the problem is!

Best,
Sander


On Tue, 1 May 2012 13:22:46 +0200
"Irina Simanova" <irina.simanova at mpi.nl> wrote:

> Hi Sander,
> 
> Which version of Fieldtrip are you using?
> 
> I have not been able to replicate your error, however, when I am
> trying to run that old piece of code, I am getting a different error
> in ft_statistics_crossvalidate ??? Undefined variable "dml" or class
> "dml.standardizer" (see below).
> 
> I cc this to Marcel van Gerven. There have been changes introduced to
> the multivariate analysis toolbox, and it indeed might explain the
> errors. Marcel, is it possible that there are compatibility errors in
> the ft_statistics_crossvalidate? Regarding the error that I got: how
> should I set the "dml" object when I call the function via Fieldtip? 
> 
> Best,
> Irina
> 
> cfg = [];
> cfg.method = 'crossvalidate';
> cfg.nfolds = 6;
> cfg.channel =  avg_tls_txt_lp.label(1:60);
> cfg.latency = [0 0.7];
> s1 = size(avg_anm_txt_lp.trial,1);
> s2 = size(avg_tls_txt_lp.trial,1);
> design = [ones(s1,1); ones(s2,1)*2];
> cfg.design = design;
> class = ft_timelockstatistics(cfg, avg_anm_txt_lp, avg_tls_txt_lp);
> selected 60 channels
> selected 351 time bins
> selected 1 frequency bins
> using "ft_statistics_crossvalidate" for the statistical testing
> ??? Undefined variable "dml" or class "dml.standardizer".
> 
> Error in ==> ft_statistics_crossvalidate at 44
>   cfg.mva = dml.analysis({ ...
> 
> Error in ==> statistics_wrapper at 298
>     [stat] = statmethod(cfg, dat, design);
> 
> Error in ==> ft_timelockstatistics at 110
> [stat, cfg] = statistics_wrapper(cfg, varargin{:});
> 
> -----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
> 



More information about the fieldtrip mailing list