{"action":"opened","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/5148","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5148/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5148/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5148/events","html_url":"https://github.com/mne-tools/mne-python/issues/5148","id":316380081,"number":5148,"title":"BUG?: average=False in compute_proj_exg","user":{"login":"larsoner","id":2365790,"avatar_url":"https://avatars1.githubusercontent.com/u/2365790?v=4","gravatar_id":"","url":"https://api.github.com/users/larsoner","html_url":"https://github.com/larsoner","followers_url":"https://api.github.com/users/larsoner/followers","following_url":"https://api.github.com/users/larsoner/following{/other_user}","gists_url":"https://api.github.com/users/larsoner/gists{/gist_id}","starred_url":"https://api.github.com/users/larsoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsoner/subscriptions","organizations_url":"https://api.github.com/users/larsoner/orgs","repos_url":"https://api.github.com/users/larsoner/repos","events_url":"https://api.github.com/users/larsoner/events{/privacy}","received_events_url":"https://api.github.com/users/larsoner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-20T19:10:59Z","updated_at":"2018-04-20T19:10:59Z","closed_at":null,"author_association":"OWNER","body":"By default we have `average=False` in `compute_proj_ecg` and `compute_proj_eog`. But when I was toying with the idea of using `Xdawn` (which I think might still be a good idea) to compute projectors rather than plain SSP, I found that `average=True` seemed to always be better than `average=False`.\r\n\r\nHere is the sample data, with four columns: the first two are `average=False`, the last two are `average=True`; within those, the left are ECG epochs (to be projected) and the right are auditory epochs (hopefully not contaminated):\r\n\r\n![xdawn](https://user-images.githubusercontent.com/2365790/39069053-800dbcd0-44ac-11e8-8ed2-b5ad53db0055.png)\r\n\r\nNote that the \"average=True\" does not really make sense for Xdawn because it already uses the average, so the first two and last two columns are the same for Xdawn.\r\n\r\nI think we might consider:\r\n\r\n1. Changing the default `average=False` to `average=True`.\r\n2. Probably unify `compute_exg_proj` and `create_exg_epochs`. The former does not use the latter but it probably should.\r\n3. Implement Xdawn as a backend instead of just SSP. Even with `average=True` it should do better against other noise present in the epochs, especially if that noise is large (yet to be shown)."}}
{"actor":{"display_login":"larsoner"}}