{
  "id": 252138,
  "title": "Do you whiten the data?",
  "url": "/competitions/g2net-gravitational-wave-detection/discussion/252138",
  "author_name": "",
  "post_date": "2021-07-10T18:32:22.451673200Z",
  "votes": 13,
  "comment_count": 9,
  "views": 0,
  "content": "<p>I have rarely used whitening preprocessing, but seems like for GW, the amplitude from low frequency (i assume the noises?) is overwhelming, so it helps to whitening data where each frequency would have normalized power and thus make potential signal more obvious. See <a href=\"https://gwpy.github.io/docs/stable/examples/timeseries/whiten.html\" target=\"_blank\">https://gwpy.github.io/docs/stable/examples/timeseries/whiten.html</a> for more details.</p>\n<p>So I tried whitening before doing any transformation, the immediate thing i notice is that, it's super slow, and it didn't show a big performance difference on my local. Just wondering have you guys tried it and what the experience is like? </p>",
  "messages": [
    {
      "id": "1383340",
      "postDate": "07/10/2021 18:32:22",
      "content": "<p>I have rarely used whitening preprocessing, but seems like for GW, the amplitude from low frequency (i assume the noises?) is overwhelming, so it helps to whitening data where each frequency would have normalized power and thus make potential signal more obvious. See <a href=\"https://gwpy.github.io/docs/stable/examples/timeseries/whiten.html\" target=\"_blank\">https://gwpy.github.io/docs/stable/examples/timeseries/whiten.html</a> for more details.</p>\n<p>So I tried whitening before doing any transformation, the immediate thing i notice is that, it's super slow, and it didn't show a big performance difference on my local. Just wondering have you guys tried it and what the experience is like? </p>",
      "rawMarkdown": "I have rarely used whitening preprocessing, but seems like for GW, the amplitude from low frequency (i assume the noises?) is overwhelming, so it helps to whitening data where each frequency would have normalized power and thus make potential signal more obvious. See https://gwpy.github.io/docs/stable/examples/timeseries/whiten.html for more details.\n\nSo I tried whitening before doing any transformation, the immediate thing i notice is that, it's super slow, and it didn't show a big performance difference on my local. Just wondering have you guys tried it and what the experience is like?",
      "votes": null
    },
    {
      "id": "1385213",
      "postDate": "07/12/2021 14:20:03",
      "content": "<p>Another discussion with results about whitening: <a href=\"https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396\" target=\"_blank\">https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396</a></p>",
      "rawMarkdown": "Another discussion with results about whitening: https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396",
      "votes": null
    },
    {
      "id": "1385621",
      "postDate": "07/12/2021 21:03:13",
      "content": "<p>I got slightly negative results with the whitening I tried.  </p>",
      "rawMarkdown": "I got slightly negative results with the whitening I tried.",
      "votes": null
    },
    {
      "id": "1385953",
      "postDate": "07/13/2021 06:09:51",
      "content": "<p>Yes, see <a href=\"https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396\" target=\"_blank\">here</a>.</p>\n<p>In short, since the nnAudio spectrogram in PYTorch was much faster than GWPy I built a whitening function using PYTorch. This was faster and enabled me to run a model in about 2 hrs, but the results were worse than unwhitened.  </p>\n<p>I'm perplexed!</p>",
      "rawMarkdown": "Yes, see [here](https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396).\n\nIn short, since the nnAudio spectrogram in PYTorch was much faster than GWPy I built a whitening function using PYTorch. This was faster and enabled me to run a model in about 2 hrs, but the results were worse than unwhitened.  \n\nI'm perplexed!",
      "votes": null
    },
    {
      "id": "1386650",
      "postDate": "07/13/2021 15:48:00",
      "content": "<p>similar impression, thanks for sharing on the torch implementation. the q trasnform looked better after whitening, so i would imagine it should have improved the result</p>\n<ol>\n<li>might be a dummy question, can we tell if the data has already be whitened? given the q-transform look more uniform than the unwhitened ones, it should have not been whitened, but the reason im asking this is because the scale of the strain is ~1e-20, which looks like there are already some preprocessing done on it, e.g. removal of some unwanted frequency that dominates the time series, the original time series seem to be on the order of 1e-18 (e.g. see <a href=\"https://gwpy.github.io/docs/stable/timeseries/plot.html)\" target=\"_blank\">https://gwpy.github.io/docs/stable/timeseries/plot.html)</a>, so i wonder if some whitening already performed</li>\n<li>our data is sampled at 2048hz but there are other higher frequency in gw open data e.g. 4khz and 16khz, so to me our data is downsampled quite a bit, would this downsample somehow affect the whiening process?</li>\n</ol>",
      "rawMarkdown": "similar impression, thanks for sharing on the torch implementation. the q trasnform looked better after whitening, so i would imagine it should have improved the result\n\n1. might be a dummy question, can we tell if the data has already be whitened? given the q-transform look more uniform than the unwhitened ones, it should have not been whitened, but the reason im asking this is because the scale of the strain is ~1e-20, which looks like there are already some preprocessing done on it, e.g. removal of some unwanted frequency that dominates the time series, the original time series seem to be on the order of 1e-18 (e.g. see https://gwpy.github.io/docs/stable/timeseries/plot.html), so i wonder if some whitening already performed\n2. our data is sampled at 2048hz but there are other higher frequency in gw open data e.g. 4khz and 16khz, so to me our data is downsampled quite a bit, would this downsample somehow affect the whiening process?",
      "votes": null
    },
    {
      "id": "1387358",
      "postDate": "07/14/2021 05:50:51",
      "content": "<p>The q-transform looked great on the real data but when I applied it to the competition sample data in I did not  see the clear signature of the \"chirp\". That puzzled me but I persisted and whitened the data transformed it then used a CNN and got a 10% lower AUC than just transforming and using the CNN.</p>\n<p>I <a href=\"https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/249978#1374248\" target=\"_blank\">asked the competition host </a>\"has filtering like this been applied to the competition data?\" and his reply was</p>\n<blockquote>\n  <p>We wanted to keep the options as open as possible to allow for possible novel approaches, so the competition data has not been pre-processed or filtered in any way.</p>\n</blockquote>\n<p>I don't think the downsampling will matter, however you could try downsampling the GW data and see.</p>",
      "rawMarkdown": "The q-transform looked great on the real data but when I applied it to the competition sample data in I did not  see the clear signature of the \"chirp\". That puzzled me but I persisted and whitened the data transformed it then used a CNN and got a 10% lower AUC than just transforming and using the CNN.\n\nI [asked the competition host ](https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/249978#1374248)\"has filtering like this been applied to the competition data?\" and his reply was\n\n> We wanted to keep the options as open as possible to allow for possible novel approaches, so the competition data has not been pre-processed or filtered in any way.\n\nI don't think the downsampling will matter, however you could try downsampling the GW data and see.",
      "votes": null
    },
    {
      "id": "1387382",
      "postDate": "07/14/2021 06:27:21",
      "content": "<p><a href=\"https://www.kaggle.com/kevinmcisaac\" target=\"_blank\">@kevinmcisaac</a>  <br>\nHow do I use upsampling, the larger the image, the better? Both LB and CV performed well</p>",
      "rawMarkdown": "kevinmcisaac  \nHow do I use upsampling, the larger the image, the better? Both LB and CV performed well",
      "votes": null
    },
    {
      "id": "1517604",
      "postDate": "09/19/2021 19:58:24",
      "content": "<p>I'm so upset about whitening. I truly hope at least one time has gotten it to work, regardless of score. So much wasted time experimenting and prodding it and trialing, hoping it'd somehow be a silver bullet….</p>",
      "rawMarkdown": "I'm so upset about whitening. I truly hope at least one time has gotten it to work, regardless of score. So much wasted time experimenting and prodding it and trialing, hoping it'd somehow be a silver bullet....",
      "votes": null
    },
    {
      "id": "1517706",
      "postDate": "09/20/2021 01:48:04",
      "content": "<p>i still think whitening should work, though i haven't made it work too.</p>\n<p>should we whiten overall data or per sample?<br>\ni think 2 sec is too short to estimate noise</p>",
      "rawMarkdown": "i still think whitening should work, though i haven't made it work too.\n\nshould we whiten overall data or per sample?\ni think 2 sec is too short to estimate noise",
      "votes": null
    },
    {
      "id": "1559726",
      "postDate": "10/27/2021 07:09:41",
      "content": "<p>Hey All,</p>\n<p>Thank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey <a href=\"https://forms.gle/QP9L16niPexozyhu5\" target=\"_blank\">https://forms.gle/QP9L16niPexozyhu5</a>.</p>\n<p>Thank you all,</p>\n<p>Regards,<br>\nChris</p>",
      "rawMarkdown": "Hey All,\n\nThank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey https://forms.gle/QP9L16niPexozyhu5.\n\nThank you all,\n\nRegards,\nChris",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1385213,
      "author_name": "aliabdin1",
      "author_url": "",
      "post_date": "07/12/2021 14:20:03",
      "content": "<p>Another discussion with results about whitening: <a href=\"https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396\" target=\"_blank\">https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1385621,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "07/12/2021 21:03:13",
      "content": "<p>I got slightly negative results with the whitening I tried.  </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1385953,
      "author_name": "kevinmcisaac",
      "author_url": "",
      "post_date": "07/13/2021 06:09:51",
      "content": "<p>Yes, see <a href=\"https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396\" target=\"_blank\">here</a>.</p>\n<p>In short, since the nnAudio spectrogram in PYTorch was much faster than GWPy I built a whitening function using PYTorch. This was faster and enabled me to run a model in about 2 hrs, but the results were worse than unwhitened.  </p>\n<p>I'm perplexed!</p>",
      "votes": null,
      "replies": [
        {
          "id": 1386650,
          "author_name": "samshipengs",
          "author_url": "",
          "post_date": "07/13/2021 15:48:00",
          "content": "<p>similar impression, thanks for sharing on the torch implementation. the q trasnform looked better after whitening, so i would imagine it should have improved the result</p>\n<ol>\n<li>might be a dummy question, can we tell if the data has already be whitened? given the q-transform look more uniform than the unwhitened ones, it should have not been whitened, but the reason im asking this is because the scale of the strain is ~1e-20, which looks like there are already some preprocessing done on it, e.g. removal of some unwanted frequency that dominates the time series, the original time series seem to be on the order of 1e-18 (e.g. see <a href=\"https://gwpy.github.io/docs/stable/timeseries/plot.html)\" target=\"_blank\">https://gwpy.github.io/docs/stable/timeseries/plot.html)</a>, so i wonder if some whitening already performed</li>\n<li>our data is sampled at 2048hz but there are other higher frequency in gw open data e.g. 4khz and 16khz, so to me our data is downsampled quite a bit, would this downsample somehow affect the whiening process?</li>\n</ol>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1387358,
          "author_name": "kevinmcisaac",
          "author_url": "",
          "post_date": "07/14/2021 05:50:51",
          "content": "<p>The q-transform looked great on the real data but when I applied it to the competition sample data in I did not  see the clear signature of the \"chirp\". That puzzled me but I persisted and whitened the data transformed it then used a CNN and got a 10% lower AUC than just transforming and using the CNN.</p>\n<p>I <a href=\"https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/249978#1374248\" target=\"_blank\">asked the competition host </a>\"has filtering like this been applied to the competition data?\" and his reply was</p>\n<blockquote>\n  <p>We wanted to keep the options as open as possible to allow for possible novel approaches, so the competition data has not been pre-processed or filtered in any way.</p>\n</blockquote>\n<p>I don't think the downsampling will matter, however you could try downsampling the GW data and see.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1387382,
          "author_name": "zhangeng",
          "author_url": "",
          "post_date": "07/14/2021 06:27:21",
          "content": "<p><a href=\"https://www.kaggle.com/kevinmcisaac\" target=\"_blank\">@kevinmcisaac</a>  <br>\nHow do I use upsampling, the larger the image, the better? Both LB and CV performed well</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1517604,
      "author_name": "authman",
      "author_url": "",
      "post_date": "09/19/2021 19:58:24",
      "content": "<p>I'm so upset about whitening. I truly hope at least one time has gotten it to work, regardless of score. So much wasted time experimenting and prodding it and trialing, hoping it'd somehow be a silver bullet….</p>",
      "votes": null,
      "replies": [
        {
          "id": 1517706,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "09/20/2021 01:48:04",
          "content": "<p>i still think whitening should work, though i haven't made it work too.</p>\n<p>should we whiten overall data or per sample?<br>\ni think 2 sec is too short to estimate noise</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1559726,
      "author_name": "zerafachris",
      "author_url": "",
      "post_date": "10/27/2021 07:09:41",
      "content": "<p>Hey All,</p>\n<p>Thank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey <a href=\"https://forms.gle/QP9L16niPexozyhu5\" target=\"_blank\">https://forms.gle/QP9L16niPexozyhu5</a>.</p>\n<p>Thank you all,</p>\n<p>Regards,<br>\nChris</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1383340": "I have rarely used whitening preprocessing, but seems like for GW, the amplitude from low frequency (i assume the noises?) is overwhelming, so it helps to whitening data where each frequency would have normalized power and thus make potential signal more obvious. See https://gwpy.github.io/docs/stable/examples/timeseries/whiten.html for more details.\n\nSo I tried whitening before doing any transformation, the immediate thing i notice is that, it's super slow, and it didn't show a big performance difference on my local. Just wondering have you guys tried it and what the experience is like?",
    "1385213": "Another discussion with results about whitening: https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396",
    "1385621": "I got slightly negative results with the whitening I tried.",
    "1385953": "Yes, see [here](https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/252396).\n\nIn short, since the nnAudio spectrogram in PYTorch was much faster than GWPy I built a whitening function using PYTorch. This was faster and enabled me to run a model in about 2 hrs, but the results were worse than unwhitened.  \n\nI'm perplexed!",
    "1386650": "similar impression, thanks for sharing on the torch implementation. the q trasnform looked better after whitening, so i would imagine it should have improved the result\n\n1. might be a dummy question, can we tell if the data has already be whitened? given the q-transform look more uniform than the unwhitened ones, it should have not been whitened, but the reason im asking this is because the scale of the strain is ~1e-20, which looks like there are already some preprocessing done on it, e.g. removal of some unwanted frequency that dominates the time series, the original time series seem to be on the order of 1e-18 (e.g. see https://gwpy.github.io/docs/stable/timeseries/plot.html), so i wonder if some whitening already performed\n2. our data is sampled at 2048hz but there are other higher frequency in gw open data e.g. 4khz and 16khz, so to me our data is downsampled quite a bit, would this downsample somehow affect the whiening process?",
    "1387358": "The q-transform looked great on the real data but when I applied it to the competition sample data in I did not  see the clear signature of the \"chirp\". That puzzled me but I persisted and whitened the data transformed it then used a CNN and got a 10% lower AUC than just transforming and using the CNN.\n\nI [asked the competition host ](https://www.kaggle.com/c/g2net-gravitational-wave-detection/discussion/249978#1374248)\"has filtering like this been applied to the competition data?\" and his reply was\n\n> We wanted to keep the options as open as possible to allow for possible novel approaches, so the competition data has not been pre-processed or filtered in any way.\n\nI don't think the downsampling will matter, however you could try downsampling the GW data and see.",
    "1387382": "kevinmcisaac  \nHow do I use upsampling, the larger the image, the better? Both LB and CV performed well",
    "1517604": "I'm so upset about whitening. I truly hope at least one time has gotten it to work, regardless of score. So much wasted time experimenting and prodding it and trialing, hoping it'd somehow be a silver bullet....",
    "1517706": "i still think whitening should work, though i haven't made it work too.\n\nshould we whiten overall data or per sample?\ni think 2 sec is too short to estimate noise",
    "1559726": "Hey All,\n\nThank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey https://forms.gle/QP9L16niPexozyhu5.\n\nThank you all,\n\nRegards,\nChris"
  },
  "source": "meta"
}