{
  "id": 255850,
  "title": "Why normalise before Q-Transform?",
  "url": "/competitions/g2net-gravitational-wave-detection/discussion/255850",
  "author_name": "",
  "post_date": "2021-07-29T12:59:42.178715500Z",
  "votes": 12,
  "comment_count": 10,
  "views": 0,
  "content": "<p>Know basic signal processing upto Fourier transforms, STFT and Mel spectrograms. Why do we normalise by the max of the signal before doing transforms like the Q-Transform?</p>",
  "messages": [
    {
      "id": "1403953",
      "postDate": "07/29/2021 12:59:42",
      "content": "<p>Know basic signal processing upto Fourier transforms, STFT and Mel spectrograms. Why do we normalise by the max of the signal before doing transforms like the Q-Transform?</p>",
      "rawMarkdown": "Know basic signal processing upto Fourier transforms, STFT and Mel spectrograms. Why do we normalise by the max of the signal before doing transforms like the Q-Transform?",
      "votes": null
    },
    {
      "id": "1404449",
      "postDate": "07/29/2021 21:35:30",
      "content": "<p>If you look at the data the amplitudes are of the order of e-22. If you don't standardize the amplitudes to say [-1, 1] then:</p>\n<ul>\n<li>The output of the QT is also order e-22. If you use plt.imgshow on just a single channel you get an image as it does normalisation for this case, however if you stack the channels and treat them as RGB then plt.imshow does not normalise and the image is all black.</li>\n<li>if you feed the QT with small coefficients to a NN you might have a problems like numerical stability or Vanishing gradients (not sure about this).</li>\n</ul>",
      "rawMarkdown": "If you look at the data the amplitudes are of the order of e-22. If you don't standardize the amplitudes to say [-1, 1] then:\n- The output of the QT is also order e-22. If you use plt.imgshow on just a single channel you get an image as it does normalisation for this case, however if you stack the channels and treat them as RGB then plt.imshow does not normalise and the image is all black.\n- if you feed the QT with small coefficients to a NN you might have a problems like numerical stability or Vanishing gradients (not sure about this).",
      "votes": null
    },
    {
      "id": "1404626",
      "postDate": "07/30/2021 05:23:03",
      "content": "<p>In this case shouldn't you standardise according to the mean of the dataset rather than the individual means? That would be representative as some signals could be larger than others which could be informative. </p>",
      "rawMarkdown": "In this case shouldn't you standardise according to the mean of the dataset rather than the individual means? That would be representative as some signals could be larger than others which could be informative.",
      "votes": null
    },
    {
      "id": "1404672",
      "postDate": "07/30/2021 06:38:20",
      "content": "<p>Spot on.  I found that using the same scale factor for all samples for all detectors gave a very small increase in AUC.</p>",
      "rawMarkdown": "Spot on.  I found that using the same scale factor for all samples for all detectors gave a very small increase in AUC.",
      "votes": null
    },
    {
      "id": "1406564",
      "postDate": "08/01/2021 00:05:26",
      "content": "<p>For a more detailed understanding read <a href=\"https://machinelearningmastery.com/batch-normalization-for-training-of-deep-neural-networks/\" target=\"_blank\">this</a> and/or <a href=\"https://en.wikipedia.org/wiki/Batch_normalization\" target=\"_blank\">this</a></p>",
      "rawMarkdown": "For a more detailed understanding read [this](https://machinelearningmastery.com/batch-normalization-for-training-of-deep-neural-networks/) and/or [this](https://en.wikipedia.org/wiki/Batch_normalization)",
      "votes": null
    },
    {
      "id": "1407066",
      "postDate": "08/01/2021 13:41:40",
      "content": "<p>Know about Batch Norm. The original input is not affected by the distribution of the weights, hence its mean and std does not change like in the case of BatchNorm. </p>",
      "rawMarkdown": "Know about Batch Norm. The original input is not affected by the distribution of the weights, hence its mean and std does not change like in the case of BatchNorm.",
      "votes": null
    },
    {
      "id": "1407069",
      "postDate": "08/01/2021 13:42:42",
      "content": "<p>Guess the amplitude does not carry very important information, the signal we are looking for always appears in relative proportion to the existing one.</p>",
      "rawMarkdown": "Guess the amplitude does not carry very important information, the signal we are looking for always appears in relative proportion to the existing one.",
      "votes": null
    },
    {
      "id": "1509786",
      "postDate": "09/11/2021 17:39:50",
      "content": "<p><a href=\"https://www.kaggle.com/kevinmcisaac\" target=\"_blank\">@kevinmcisaac</a> - I've used the same scale factor for all three detectors within one observed event, but different factors for each distinct event. The improvement over the more common \"fresh normalisation factor for each detector for each event\" is perhaps 0.0001 - 0.0003, though not consistent. It would be interesting to learn what other people have found.</p>",
      "rawMarkdown": "kevinmcisaac - I've used the same scale factor for all three detectors within one observed event, but different factors for each distinct event. The improvement over the more common \"fresh normalisation factor for each detector for each event\" is perhaps 0.0001 - 0.0003, though not consistent. It would be interesting to learn what other people have found.",
      "votes": null
    },
    {
      "id": "1559694",
      "postDate": "10/27/2021 07:06:46",
      "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
    },
    {
      "id": "1559987",
      "postDate": "10/27/2021 08:53:02",
      "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
    },
    {
      "id": "1561051",
      "postDate": "10/27/2021 09:45:19",
      "content": "<p>It subsequently turned out that normalising everything by multiplying by the same factor of 1E20 was much more successful, leading to an improvement of ~0.0021 LB.</p>",
      "rawMarkdown": "It subsequently turned out that normalising everything by multiplying by the same factor of 1E20 was much more successful, leading to an improvement of ~0.0021 LB.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1404449,
      "author_name": "kevinmcisaac",
      "author_url": "",
      "post_date": "07/29/2021 21:35:30",
      "content": "<p>If you look at the data the amplitudes are of the order of e-22. If you don't standardize the amplitudes to say [-1, 1] then:</p>\n<ul>\n<li>The output of the QT is also order e-22. If you use plt.imgshow on just a single channel you get an image as it does normalisation for this case, however if you stack the channels and treat them as RGB then plt.imshow does not normalise and the image is all black.</li>\n<li>if you feed the QT with small coefficients to a NN you might have a problems like numerical stability or Vanishing gradients (not sure about this).</li>\n</ul>",
      "votes": null,
      "replies": [
        {
          "id": 1404626,
          "author_name": "bluesky314",
          "author_url": "",
          "post_date": "07/30/2021 05:23:03",
          "content": "<p>In this case shouldn't you standardise according to the mean of the dataset rather than the individual means? That would be representative as some signals could be larger than others which could be informative. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1404672,
          "author_name": "kevinmcisaac",
          "author_url": "",
          "post_date": "07/30/2021 06:38:20",
          "content": "<p>Spot on.  I found that using the same scale factor for all samples for all detectors gave a very small increase in AUC.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1407069,
          "author_name": "bluesky314",
          "author_url": "",
          "post_date": "08/01/2021 13:42:42",
          "content": "<p>Guess the amplitude does not carry very important information, the signal we are looking for always appears in relative proportion to the existing one.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1509786,
          "author_name": "jbomitchell",
          "author_url": "",
          "post_date": "09/11/2021 17:39:50",
          "content": "<p><a href=\"https://www.kaggle.com/kevinmcisaac\" target=\"_blank\">@kevinmcisaac</a> - I've used the same scale factor for all three detectors within one observed event, but different factors for each distinct event. The improvement over the more common \"fresh normalisation factor for each detector for each event\" is perhaps 0.0001 - 0.0003, though not consistent. It would be interesting to learn what other people have found.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1561051,
          "author_name": "jbomitchell",
          "author_url": "",
          "post_date": "10/27/2021 09:45:19",
          "content": "<p>It subsequently turned out that normalising everything by multiplying by the same factor of 1E20 was much more successful, leading to an improvement of ~0.0021 LB.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1406564,
      "author_name": "kevinmcisaac",
      "author_url": "",
      "post_date": "08/01/2021 00:05:26",
      "content": "<p>For a more detailed understanding read <a href=\"https://machinelearningmastery.com/batch-normalization-for-training-of-deep-neural-networks/\" target=\"_blank\">this</a> and/or <a href=\"https://en.wikipedia.org/wiki/Batch_normalization\" target=\"_blank\">this</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1407066,
          "author_name": "bluesky314",
          "author_url": "",
          "post_date": "08/01/2021 13:41:40",
          "content": "<p>Know about Batch Norm. The original input is not affected by the distribution of the weights, hence its mean and std does not change like in the case of BatchNorm. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1559694,
      "author_name": "zerafachris",
      "author_url": "",
      "post_date": "10/27/2021 07:06:46",
      "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": []
    },
    {
      "id": 1559987,
      "author_name": "zerafachris",
      "author_url": "",
      "post_date": "10/27/2021 08:53:02",
      "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": {
    "1403953": "Know basic signal processing upto Fourier transforms, STFT and Mel spectrograms. Why do we normalise by the max of the signal before doing transforms like the Q-Transform?",
    "1404449": "If you look at the data the amplitudes are of the order of e-22. If you don't standardize the amplitudes to say [-1, 1] then:\n- The output of the QT is also order e-22. If you use plt.imgshow on just a single channel you get an image as it does normalisation for this case, however if you stack the channels and treat them as RGB then plt.imshow does not normalise and the image is all black.\n- if you feed the QT with small coefficients to a NN you might have a problems like numerical stability or Vanishing gradients (not sure about this).",
    "1404626": "In this case shouldn't you standardise according to the mean of the dataset rather than the individual means? That would be representative as some signals could be larger than others which could be informative.",
    "1404672": "Spot on.  I found that using the same scale factor for all samples for all detectors gave a very small increase in AUC.",
    "1406564": "For a more detailed understanding read [this](https://machinelearningmastery.com/batch-normalization-for-training-of-deep-neural-networks/) and/or [this](https://en.wikipedia.org/wiki/Batch_normalization)",
    "1407066": "Know about Batch Norm. The original input is not affected by the distribution of the weights, hence its mean and std does not change like in the case of BatchNorm.",
    "1407069": "Guess the amplitude does not carry very important information, the signal we are looking for always appears in relative proportion to the existing one.",
    "1509786": "kevinmcisaac - I've used the same scale factor for all three detectors within one observed event, but different factors for each distinct event. The improvement over the more common \"fresh normalisation factor for each detector for each event\" is perhaps 0.0001 - 0.0003, though not consistent. It would be interesting to learn what other people have found.",
    "1559694": "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",
    "1559987": "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",
    "1561051": "It subsequently turned out that normalising everything by multiplying by the same factor of 1E20 was much more successful, leading to an improvement of ~0.0021 LB."
  },
  "source": "meta"
}