# Classification of ERPs for several subjects

**URL:** <https://mne.discourse.group/t/classification-of-erps-for-several-subjects/924>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [November 19, 2015, 3:50pm UTC](https://mne.discourse.group/t/classification-of-erps-for-several-subjects/924 "2015-11-19T15:50:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [November 19, 2015, 3:50pm UTC](https://mne.discourse.group/t/classification-of-erps-for-several-subjects/924/1 "2015-11-19T15:50:50Z")

</div>

Hi All,  
I am new to MNE and need your help to classify my ERPs in two different  
conditions for 12 subjects. I would like to combine LDA and CSP for this  
reason in the way that I use the ERPs of let's say 11 subjects and train my  
classifier based on that and to test it on the rest of subjects.  
My problem is in this line of my code:

scores = cross\_val\_score(clf, evoked\_data\_array, labels, cv=cv, n\_jobs=1)

here, my evoked\_data\_array is an array of [2\* number of subjects(24)\*number  
of channels (64)\*number of samples of the ERP]. I get this error:  
Found arrays with inconsistent numbers of samples: [24 64]

I guess that's because I am using a 3D array instead of 2D, right? Do you  
have any suggestions how I can solve the issue?

Thank you very much in advance,  
Forooz Shahbazi  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20151119/443493ef/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151119/443493ef/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [November 19, 2015, 5:11pm UTC](https://mne.discourse.group/t/classification-of-erps-for-several-subjects/924/2 "2015-11-19T17:11:01Z")

</div>

hi,

did you follow this example:

[http://martinos.org/mne/dev/auto\_examples/decoding/plot\_decoding\_csp\_space.html#sphx-glr-auto-examples-decoding-plot-decoding-csp-space-py](http://martinos.org/mne/dev/auto_examples/decoding/plot_decoding_csp_space.html#sphx-glr-auto-examples-decoding-plot-decoding-csp-space-py)

?

does it work for you?

Alex
