{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/3245","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3245/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3245/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3245/events","html_url":"https://github.com/mne-tools/mne-python/pull/3245","id":156137493,"number":3245,"title":"[WIP] EpochVectorizer changed to accept epochs","user":{"login":"kaichogami","id":6412770,"avatar_url":"https://avatars.githubusercontent.com/u/6412770?v=3","gravatar_id":"","url":"https://api.github.com/users/kaichogami","html_url":"https://github.com/kaichogami","followers_url":"https://api.github.com/users/kaichogami/followers","following_url":"https://api.github.com/users/kaichogami/following{/other_user}","gists_url":"https://api.github.com/users/kaichogami/gists{/gist_id}","starred_url":"https://api.github.com/users/kaichogami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaichogami/subscriptions","organizations_url":"https://api.github.com/users/kaichogami/orgs","repos_url":"https://api.github.com/users/kaichogami/repos","events_url":"https://api.github.com/users/kaichogami/events{/privacy}","received_events_url":"https://api.github.com/users/kaichogami/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2016-05-22T06:22:16Z","updated_at":"2016-05-30T17:48:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3245","html_url":"https://github.com/mne-tools/mne-python/pull/3245","diff_url":"https://github.com/mne-tools/mne-python/pull/3245.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/3245.patch"},"body":"Hello\r\nAfter discussion with @kingjr @dengemann we came into the conclusion of new API for decoding and dropped `Vectorizer`(see #3212). Following it closely with `scikit-learn` each transformer will work with 2-D data. Data from complex objects would be extracted by a new `Vectorizer` class.\r\n```\r\ne = EpochsVectorizer()\r\nX, y = e.fit_transform(epochs)\r\nclf = make_pipeline(Covariance(info = epochs.info), LogisticRegression())\r\nclf.fit(X[train], y[train])\r\npred = clf.predict(X[test])\r\n```\r\nThe `info`, being a mne step could change in the pipeline of transformers. Passing the updated `info` requires thinking.\r\nFor getting community feedback, I have changed `EpochsVectorizer`. Please let us know what are your views on our proposed change!\r\nThank you\r\n"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/222533732","html_url":"https://github.com/mne-tools/mne-python/pull/3245#issuecomment-222533732","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3245","id":222533732,"user":{"login":"alexandrebarachant","id":2145718,"avatar_url":"https://avatars.githubusercontent.com/u/2145718?v=3","gravatar_id":"","url":"https://api.github.com/users/alexandrebarachant","html_url":"https://github.com/alexandrebarachant","followers_url":"https://api.github.com/users/alexandrebarachant/followers","following_url":"https://api.github.com/users/alexandrebarachant/following{/other_user}","gists_url":"https://api.github.com/users/alexandrebarachant/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrebarachant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrebarachant/subscriptions","organizations_url":"https://api.github.com/users/alexandrebarachant/orgs","repos_url":"https://api.github.com/users/alexandrebarachant/repos","events_url":"https://api.github.com/users/alexandrebarachant/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrebarachant/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T17:48:48Z","updated_at":"2016-05-30T17:48:48Z","body":"Orginally, Xdawn is designed for P300 BCI. It uses an rERP style procedure to separate the P300 from the visual EP. In this case that becomes really tricky, because it will have to extract an averaged rERP corresponding to all stimulus (both target and non-target) and one for only target stimulus. This is actually not supported by the current MNE xdawn, but i think is supported by the rERP method.  \r\n\r\nIn other word, for the original Xdawn, the labels you have to pass can be different from the labels you will use for the classifier. Which also break the possibility to pipeline the method with the sklearn pipeline mechanism. \r\n\r\nThe pyRiemann implementation of Xdawn is a \"light\" implementation (that actually works very well), but is sub-optimal with respect to the Xdawn described in Rivet et. al. 2009"}}
{"actor":{"display_login":"alexandrebarachant"}}