{
  "id": 267490,
  "title": "First Stack then Whiten or Vice versa?",
  "url": "/competitions/g2net-gravitational-wave-detection/discussion/267490",
  "author_name": "",
  "post_date": "2021-08-23T13:58:26.684978700Z",
  "votes": 6,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Hi all ,<br>\nI am still trying to understand ways to tackle the problem at hand , I just have one more dumb doubt and it would be great if someone clears it.</p>\n<p>We have been wave detections from three different interferometers which are independent of each other and hence might have independent signals , thus while whitening and band filtering won't it make sense to do that to individual time series independently and then merge them instead of doing the opposite which I have seen being done in the public kernels</p>\n<p>Also has anyone tried to stack the time series vertically and treat them as different channels ?</p>",
  "messages": [
    {
      "id": "1487252",
      "postDate": "08/23/2021 13:58:26",
      "content": "<p>Hi all ,<br>\nI am still trying to understand ways to tackle the problem at hand , I just have one more dumb doubt and it would be great if someone clears it.</p>\n<p>We have been wave detections from three different interferometers which are independent of each other and hence might have independent signals , thus while whitening and band filtering won't it make sense to do that to individual time series independently and then merge them instead of doing the opposite which I have seen being done in the public kernels</p>\n<p>Also has anyone tried to stack the time series vertically and treat them as different channels ?</p>",
      "rawMarkdown": "Hi all ,\nI am still trying to understand ways to tackle the problem at hand , I just have one more dumb doubt and it would be great if someone clears it.\n\nWe have been wave detections from three different interferometers which are independent of each other and hence might have independent signals , thus while whitening and band filtering won't it make sense to do that to individual time series independently and then merge them instead of doing the opposite which I have seen being done in the public kernels\n\nAlso has anyone tried to stack the time series vertically and treat them as different channels ?",
      "votes": null
    },
    {
      "id": "1487453",
      "postDate": "08/23/2021 16:31:09",
      "content": "<p>Don't worry <a href=\"https://www.kaggle.com/tanulsingh077\" target=\"_blank\">@tanulsingh077</a>, those operations are applied vectorially per channel ;-).<br>\nAlso while overall the waves probably aren't dependent, over the small window of the GW event, at least when shifted they should present a large amount of correlation.</p>\n<blockquote>\n  <p>Also has anyone tried to stack the time series vertically and treat them as different channels ?</p>\n</blockquote>\n<p>Haven't experimented with it yet, but most public kernels at this point take the stack, dump it into CQT1992v2 or CWT, hstack, then run effnet on the single dimensional image output. Looks like it's time to experiment.</p>\n<p>EDIT<br>\nThinking about this a bit more, feeding in the data as channels doesn't really make much sense given what the convolution operation is responsible for. Imagine if we saw red, green, and blue light actually phase shifted (I know, different frequencies, but say something on the order of a second). It would make it impossible to function with that sort of lag and would be quite confusing. HStack and VStack should produce either identical or near identical results. The other option is to use a shared backbone and do something like a siamese network where you run each channel through separately and then combine with a special head.</p>",
      "rawMarkdown": "Don't worry @tanulsingh077, those operations are applied vectorially per channel ;-).\nAlso while overall the waves probably aren't dependent, over the small window of the GW event, at least when shifted they should present a large amount of correlation.\n\n> Also has anyone tried to stack the time series vertically and treat them as different channels ?\n\nHaven't experimented with it yet, but most public kernels at this point take the stack, dump it into CQT1992v2 or CWT, hstack, then run effnet on the single dimensional image output. Looks like it's time to experiment.\n\nEDIT\nThinking about this a bit more, feeding in the data as channels doesn't really make much sense given what the convolution operation is responsible for. Imagine if we saw red, green, and blue light actually phase shifted (I know, different frequencies, but say something on the order of a second). It would make it impossible to function with that sort of lag and would be quite confusing. HStack and VStack should produce either identical or near identical results. The other option is to use a shared backbone and do something like a siamese network where you run each channel through separately and then combine with a special head.",
      "votes": null
    },
    {
      "id": "1487731",
      "postDate": "08/23/2021 19:27:37",
      "content": "<p>Thanks for the reply , I actually tried doing ( concat all three time series --&gt; whiten --&gt; bandpass --&gt; CQT ) and ( take individual time series --&gt; whiten --&gt; bandpass --&gt; concat --&gt; CQT) and I am getting different images at the end</p>",
      "rawMarkdown": "Thanks for the reply , I actually tried doing ( concat all three time series --> whiten --> bandpass --> CQT ) and ( take individual time series --> whiten --> bandpass --> concat --> CQT) and I am getting different images at the end",
      "votes": null
    },
    {
      "id": "1487774",
      "postDate": "08/23/2021 20:13:37",
      "content": "<p>This is expected.</p>\n<p>If you do the hstacking where you have all the images next to one another horizontally as one big signal, then all three of those operations will be negatively affected (whiten, bandpass, cqt). But if the cat operation happens on axis=0 (as is the way the raw numpy files are presented), then all three of those operations should happen independently. I just tried to verify the results and the (individual-channel_stacked).sum() value was == 0. Most public kernels leave the data as-is [3,4096] all the way through preprocessing, and then after creating a spectrogram image, then they stitch them together horizontally.</p>",
      "rawMarkdown": "This is expected.\n\nIf you do the hstacking where you have all the images next to one another horizontally as one big signal, then all three of those operations will be negatively affected (whiten, bandpass, cqt). But if the cat operation happens on axis=0 (as is the way the raw numpy files are presented), then all three of those operations should happen independently. I just tried to verify the results and the (individual-channel_stacked).sum() value was == 0. Most public kernels leave the data as-is [3,4096] all the way through preprocessing, and then after creating a spectrogram image, then they stitch them together horizontally.",
      "votes": null
    },
    {
      "id": "1490633",
      "postDate": "08/25/2021 18:29:53",
      "content": "<p>see this:</p>\n<p><a href=\"https://colab.research.google.com/github/gwastro/pycbc-tutorials/blob/master/tutorial/2_VisualizationSignalProcessing.ipynb\" target=\"_blank\">https://colab.research.google.com/github/gwastro/pycbc-tutorials/blob/master/tutorial/2_VisualizationSignalProcessing.ipynb</a></p>",
      "rawMarkdown": "see this:\n\nhttps://colab.research.google.com/github/gwastro/pycbc-tutorials/blob/master/tutorial/2_VisualizationSignalProcessing.ipynb",
      "votes": null
    },
    {
      "id": "1490656",
      "postDate": "08/25/2021 19:02:10",
      "content": "<p>Very excited to see you enter into the competition <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>. Looks like the discussion section is about to get a lot more interesting.</p>",
      "rawMarkdown": "Very excited to see you enter into the competition @hengck23. Looks like the discussion section is about to get a lot more interesting.",
      "votes": null
    },
    {
      "id": "1560998",
      "postDate": "10/27/2021 09:03:40",
      "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": 1487453,
      "author_name": "authman",
      "author_url": "",
      "post_date": "08/23/2021 16:31:09",
      "content": "<p>Don't worry <a href=\"https://www.kaggle.com/tanulsingh077\" target=\"_blank\">@tanulsingh077</a>, those operations are applied vectorially per channel ;-).<br>\nAlso while overall the waves probably aren't dependent, over the small window of the GW event, at least when shifted they should present a large amount of correlation.</p>\n<blockquote>\n  <p>Also has anyone tried to stack the time series vertically and treat them as different channels ?</p>\n</blockquote>\n<p>Haven't experimented with it yet, but most public kernels at this point take the stack, dump it into CQT1992v2 or CWT, hstack, then run effnet on the single dimensional image output. Looks like it's time to experiment.</p>\n<p>EDIT<br>\nThinking about this a bit more, feeding in the data as channels doesn't really make much sense given what the convolution operation is responsible for. Imagine if we saw red, green, and blue light actually phase shifted (I know, different frequencies, but say something on the order of a second). It would make it impossible to function with that sort of lag and would be quite confusing. HStack and VStack should produce either identical or near identical results. The other option is to use a shared backbone and do something like a siamese network where you run each channel through separately and then combine with a special head.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1487731,
          "author_name": "tanulsingh077",
          "author_url": "",
          "post_date": "08/23/2021 19:27:37",
          "content": "<p>Thanks for the reply , I actually tried doing ( concat all three time series --&gt; whiten --&gt; bandpass --&gt; CQT ) and ( take individual time series --&gt; whiten --&gt; bandpass --&gt; concat --&gt; CQT) and I am getting different images at the end</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1487774,
          "author_name": "authman",
          "author_url": "",
          "post_date": "08/23/2021 20:13:37",
          "content": "<p>This is expected.</p>\n<p>If you do the hstacking where you have all the images next to one another horizontally as one big signal, then all three of those operations will be negatively affected (whiten, bandpass, cqt). But if the cat operation happens on axis=0 (as is the way the raw numpy files are presented), then all three of those operations should happen independently. I just tried to verify the results and the (individual-channel_stacked).sum() value was == 0. Most public kernels leave the data as-is [3,4096] all the way through preprocessing, and then after creating a spectrogram image, then they stitch them together horizontally.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1490633,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "08/25/2021 18:29:53",
      "content": "<p>see this:</p>\n<p><a href=\"https://colab.research.google.com/github/gwastro/pycbc-tutorials/blob/master/tutorial/2_VisualizationSignalProcessing.ipynb\" target=\"_blank\">https://colab.research.google.com/github/gwastro/pycbc-tutorials/blob/master/tutorial/2_VisualizationSignalProcessing.ipynb</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1490656,
          "author_name": "authman",
          "author_url": "",
          "post_date": "08/25/2021 19:02:10",
          "content": "<p>Very excited to see you enter into the competition <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>. Looks like the discussion section is about to get a lot more interesting.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1560998,
      "author_name": "zerafachris",
      "author_url": "",
      "post_date": "10/27/2021 09:03:40",
      "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": {
    "1487252": "Hi all ,\nI am still trying to understand ways to tackle the problem at hand , I just have one more dumb doubt and it would be great if someone clears it.\n\nWe have been wave detections from three different interferometers which are independent of each other and hence might have independent signals , thus while whitening and band filtering won't it make sense to do that to individual time series independently and then merge them instead of doing the opposite which I have seen being done in the public kernels\n\nAlso has anyone tried to stack the time series vertically and treat them as different channels ?",
    "1487453": "Don't worry @tanulsingh077, those operations are applied vectorially per channel ;-).\nAlso while overall the waves probably aren't dependent, over the small window of the GW event, at least when shifted they should present a large amount of correlation.\n\n> Also has anyone tried to stack the time series vertically and treat them as different channels ?\n\nHaven't experimented with it yet, but most public kernels at this point take the stack, dump it into CQT1992v2 or CWT, hstack, then run effnet on the single dimensional image output. Looks like it's time to experiment.\n\nEDIT\nThinking about this a bit more, feeding in the data as channels doesn't really make much sense given what the convolution operation is responsible for. Imagine if we saw red, green, and blue light actually phase shifted (I know, different frequencies, but say something on the order of a second). It would make it impossible to function with that sort of lag and would be quite confusing. HStack and VStack should produce either identical or near identical results. The other option is to use a shared backbone and do something like a siamese network where you run each channel through separately and then combine with a special head.",
    "1487731": "Thanks for the reply , I actually tried doing ( concat all three time series --> whiten --> bandpass --> CQT ) and ( take individual time series --> whiten --> bandpass --> concat --> CQT) and I am getting different images at the end",
    "1487774": "This is expected.\n\nIf you do the hstacking where you have all the images next to one another horizontally as one big signal, then all three of those operations will be negatively affected (whiten, bandpass, cqt). But if the cat operation happens on axis=0 (as is the way the raw numpy files are presented), then all three of those operations should happen independently. I just tried to verify the results and the (individual-channel_stacked).sum() value was == 0. Most public kernels leave the data as-is [3,4096] all the way through preprocessing, and then after creating a spectrogram image, then they stitch them together horizontally.",
    "1490633": "see this:\n\nhttps://colab.research.google.com/github/gwastro/pycbc-tutorials/blob/master/tutorial/2_VisualizationSignalProcessing.ipynb",
    "1490656": "Very excited to see you enter into the competition @hengck23. Looks like the discussion section is about to get a lot more interesting.",
    "1560998": "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"
}