{
  "id": 482090,
  "title": "ICA to remove remove artifact",
  "url": "/competitions/hms-harmful-brain-activity-classification/discussion/482090",
  "author_name": "",
  "post_date": "2024-03-06T09:15:16.832002600Z",
  "votes": 4,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I read many literature on using Independent Component analysis to remove artifact. Has anybody had any luck on using this techniques? </p>\n<p>This is an interesting documentation found using mne but creating an mne object for each eeg seems painful. <br>\n<a href=\"url\" target=\"_blank\">https://mne.tools/stable/auto_examples/preprocessing/muscle_ica.html#sphx-glr-auto-examples-preprocessing-muscle-ica-py</a></p>\n<p>Here is the scikit learn implementation:<br>\n<a href=\"url\" target=\"_blank\">https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.FastICA.html</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6248361%2F2c20759ce6fef73967a5363b4baa84e5%2FScreen%20Shot%202024-03-06%20at%204.13.48%20AM.png?generation=1709716495870082&amp;alt=media\"></p>",
  "messages": [
    {
      "id": "2683885",
      "postDate": "03/06/2024 09:15:16",
      "content": "<p>I read many literature on using Independent Component analysis to remove artifact. Has anybody had any luck on using this techniques? </p>\n<p>This is an interesting documentation found using mne but creating an mne object for each eeg seems painful. <br>\n<a href=\"url\" target=\"_blank\">https://mne.tools/stable/auto_examples/preprocessing/muscle_ica.html#sphx-glr-auto-examples-preprocessing-muscle-ica-py</a></p>\n<p>Here is the scikit learn implementation:<br>\n<a href=\"url\" target=\"_blank\">https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.FastICA.html</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6248361%2F2c20759ce6fef73967a5363b4baa84e5%2FScreen%20Shot%202024-03-06%20at%204.13.48%20AM.png?generation=1709716495870082&amp;alt=media\"></p>",
      "rawMarkdown": "I read many literature on using Independent Component analysis to remove artifact. Has anybody had any luck on using this techniques? \n\nThis is an interesting documentation found using mne but creating an mne object for each eeg seems painful. \n[https://mne.tools/stable/auto_examples/preprocessing/muscle_ica.html#sphx-glr-auto-examples-preprocessing-muscle-ica-py](url)\n\nHere is the scikit learn implementation:\n[https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.FastICA.html](url)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6248361%2F2c20759ce6fef73967a5363b4baa84e5%2FScreen%20Shot%202024-03-06%20at%204.13.48%20AM.png?generation=1709716495870082&alt=media)",
      "votes": null
    },
    {
      "id": "2687045",
      "postDate": "03/08/2024 08:16:35",
      "content": "<p>I've experimented with it recently and have not noticed any performance gain. Likely, CNN filters can do exactly the same job under the hood as ICA or any other algorithm. Also, I'd say integrating ICA (say, from MNE library) into the inference pipeline is computationally prohibitive - it took me on average 6 seconds per EEG instance on A100.</p>",
      "rawMarkdown": "I've experimented with it recently and have not noticed any performance gain. Likely, CNN filters can do exactly the same job under the hood as ICA or any other algorithm. Also, I'd say integrating ICA (say, from MNE library) into the inference pipeline is computationally prohibitive - it took me on average 6 seconds per EEG instance on A100.",
      "votes": null
    },
    {
      "id": "2687071",
      "postDate": "03/08/2024 09:00:14",
      "content": "<p>same on my end, thought it would be an interesting way to remove background. Did you play with any processing steps for noise/artifacts?</p>",
      "rawMarkdown": "same on my end, thought it would be an interesting way to remove background. Did you play with any processing steps for noise/artifacts?",
      "votes": null
    },
    {
      "id": "2687113",
      "postDate": "03/08/2024 09:37:22",
      "content": "<p>I've tried filters and MNE tools to remove ECG, EOG and power AC artifacts, but, as being said, I see no major effect on validation loss. And, generally speaking, I do no not like this approach - it's kind of overfitting the model manually: I might know little-to-nothing about the EEG and the ultimate goal is to make model do the job, with a no-to-minimum external parameters (like filters, etc.)</p>",
      "rawMarkdown": "I've tried filters and MNE tools to remove ECG, EOG and power AC artifacts, but, as being said, I see no major effect on validation loss. And, generally speaking, I do no not like this approach - it's kind of overfitting the model manually: I might know little-to-nothing about the EEG and the ultimate goal is to make model do the job, with a no-to-minimum external parameters (like filters, etc.)",
      "votes": null
    },
    {
      "id": "2724984",
      "postDate": "03/31/2024 08:40:57",
      "content": "<p>There was no effect in the current LB with or without applying scikit-learn's FASTICA. In fact, it seems to have worsened somewhat.<br>\nTuning ICA is easy when visualizing individual data, but it seems to be quite difficult to tune everything properly for a large amount of data like kaggle.</p>\n<p>Also, given the need to identify sudden spasms in this contest, classical artifact removal may be difficult as it may remove more than necessary.</p>\n<p>Translated with DeepL.com (free version)</p>",
      "rawMarkdown": "There was no effect in the current LB with or without applying scikit-learn's FASTICA. In fact, it seems to have worsened somewhat.\nTuning ICA is easy when visualizing individual data, but it seems to be quite difficult to tune everything properly for a large amount of data like kaggle.\n\nAlso, given the need to identify sudden spasms in this contest, classical artifact removal may be difficult as it may remove more than necessary.\n\nTranslated with DeepL.com (free version)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2687045,
      "author_name": "victorshlepov",
      "author_url": "",
      "post_date": "03/08/2024 08:16:35",
      "content": "<p>I've experimented with it recently and have not noticed any performance gain. Likely, CNN filters can do exactly the same job under the hood as ICA or any other algorithm. Also, I'd say integrating ICA (say, from MNE library) into the inference pipeline is computationally prohibitive - it took me on average 6 seconds per EEG instance on A100.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2687071,
          "author_name": "tashin47",
          "author_url": "",
          "post_date": "03/08/2024 09:00:14",
          "content": "<p>same on my end, thought it would be an interesting way to remove background. Did you play with any processing steps for noise/artifacts?</p>",
          "votes": null,
          "replies": [
            {
              "id": 2687113,
              "author_name": "victorshlepov",
              "author_url": "",
              "post_date": "03/08/2024 09:37:22",
              "content": "<p>I've tried filters and MNE tools to remove ECG, EOG and power AC artifacts, but, as being said, I see no major effect on validation loss. And, generally speaking, I do no not like this approach - it's kind of overfitting the model manually: I might know little-to-nothing about the EEG and the ultimate goal is to make model do the job, with a no-to-minimum external parameters (like filters, etc.)</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2724984,
      "author_name": "tc0000",
      "author_url": "",
      "post_date": "03/31/2024 08:40:57",
      "content": "<p>There was no effect in the current LB with or without applying scikit-learn's FASTICA. In fact, it seems to have worsened somewhat.<br>\nTuning ICA is easy when visualizing individual data, but it seems to be quite difficult to tune everything properly for a large amount of data like kaggle.</p>\n<p>Also, given the need to identify sudden spasms in this contest, classical artifact removal may be difficult as it may remove more than necessary.</p>\n<p>Translated with DeepL.com (free version)</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2683885": "I read many literature on using Independent Component analysis to remove artifact. Has anybody had any luck on using this techniques? \n\nThis is an interesting documentation found using mne but creating an mne object for each eeg seems painful. \n[https://mne.tools/stable/auto_examples/preprocessing/muscle_ica.html#sphx-glr-auto-examples-preprocessing-muscle-ica-py](url)\n\nHere is the scikit learn implementation:\n[https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.FastICA.html](url)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6248361%2F2c20759ce6fef73967a5363b4baa84e5%2FScreen%20Shot%202024-03-06%20at%204.13.48%20AM.png?generation=1709716495870082&alt=media)",
    "2687045": "I've experimented with it recently and have not noticed any performance gain. Likely, CNN filters can do exactly the same job under the hood as ICA or any other algorithm. Also, I'd say integrating ICA (say, from MNE library) into the inference pipeline is computationally prohibitive - it took me on average 6 seconds per EEG instance on A100.",
    "2687071": "same on my end, thought it would be an interesting way to remove background. Did you play with any processing steps for noise/artifacts?",
    "2687113": "I've tried filters and MNE tools to remove ECG, EOG and power AC artifacts, but, as being said, I see no major effect on validation loss. And, generally speaking, I do no not like this approach - it's kind of overfitting the model manually: I might know little-to-nothing about the EEG and the ultimate goal is to make model do the job, with a no-to-minimum external parameters (like filters, etc.)",
    "2724984": "There was no effect in the current LB with or without applying scikit-learn's FASTICA. In fact, it seems to have worsened somewhat.\nTuning ICA is easy when visualizing individual data, but it seems to be quite difficult to tune everything properly for a large amount of data like kaggle.\n\nAlso, given the need to identify sudden spasms in this contest, classical artifact removal may be difficult as it may remove more than necessary.\n\nTranslated with DeepL.com (free version)"
  },
  "source": "meta"
}