{
  "id": 416298,
  "title": "5th Place Solution",
  "url": "/competitions/tlvmc-parkinsons-freezing-gait-prediction/discussion/416298",
  "author_name": "",
  "post_date": "2023-06-10T16:18:59.118311200Z",
  "votes": 20,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I have entered quite late in the competition and my first submission is just 5 days before the competition deadline. I feel a bit lucky as initial model architecture selection has resulted in good score. </p>\n<p>I started this competition as competition data is time series and it is provide possibility to model the objective in many possible ways, 1D U-Net, Transformer based model, Spectrogram based modelling,  WaveNet and many more. <br>\nI also feel that once involved then you go through the winning solutions and learn so many things.</p>\n<p>As I have limited time I started with model that was used previously in IonSwitching competition, Wavenet + GRU (Wavenet). The competition had similar point wise prediction requirement.<br>\n<strong>Single 5 Fold model</strong> with Binary Focal Loss scored 0.42 on private leaderboard, 0.48 on public leaderboard but I had not selected it as it socre lower on local CV setup.</p>\n<p><a href=\"https://www.kaggle.com/code/adityakumarsinha/wavenet-subm-focal-v1?scriptVersionId=132385797\" target=\"_blank\">https://www.kaggle.com/code/adityakumarsinha/wavenet-subm-focal-v1?scriptVersionId=132385797</a></p>\n<p>I have used both defog and tDCS fog ( resampled at 100 Hz) data for training the models. <br>\nFor training the series is divided in multiple windows of size 2000 with overlap of 500. For single epoch I randomly chose one window for tDCS fog data and 4 windows for defog data. Interestingly when I sampled defog data with Validation column set as True the local CV score was lower so I sticked to do training with complete data.</p>\n<p>While inference the series is divided into segment of length 20000 and then predicted. In my local CV setup and public result I found that score is higher for longer time series so based on experiment I used 20000 and 16000 segment size, it means most of the complete tDCS series is predicted at once.</p>\n<p>Now i like to mention two interesting thing happened to me:</p>\n<ol>\n<li>I exhausted my Kaggle GPU quota, so last 3-4 submission I have used to OpenVino for CPU based inferencing.  (Thanks for inferencing notebooks of BirdClef competition). This limitation also hindered me to try more complex models and prediction techniques (prediction on sliding window and then aggregating). <br>\nSo I request Kaggle to reserve some GPU quota only for submission purpose. </li>\n<li>I have done 1 pre training on dailiy living with target of predicting next element in the series and used the weights to do normal training. I found that even though  local cv score is lower for this model but its ensemble with improved competition metrics a lot for both local CV and public leader board but not so with private leaderboard and thus drop in my ranking on private leader board 😔</li>\n</ol>\n<p>Both of my final submission scored <strong>0.389</strong> on the private leader board  and its an ensemble that  included the model I mentioned in point 2 and it was definitely over-fitting o on public leaderboard.</p>\n<p>In the end thanks for the competition organizer to provide interesting dataset which will ultimately help people with Parkinson disease.</p>\n<p>This is my first individual Gold Medal and I am still \"in the money\" rank, so ultimately feeling good and excited.</p>",
  "messages": [
    {
      "id": "2295150",
      "postDate": "06/10/2023 16:18:59",
      "content": "<p>I have entered quite late in the competition and my first submission is just 5 days before the competition deadline. I feel a bit lucky as initial model architecture selection has resulted in good score. </p>\n<p>I started this competition as competition data is time series and it is provide possibility to model the objective in many possible ways, 1D U-Net, Transformer based model, Spectrogram based modelling,  WaveNet and many more. <br>\nI also feel that once involved then you go through the winning solutions and learn so many things.</p>\n<p>As I have limited time I started with model that was used previously in IonSwitching competition, Wavenet + GRU (Wavenet). The competition had similar point wise prediction requirement.<br>\n<strong>Single 5 Fold model</strong> with Binary Focal Loss scored 0.42 on private leaderboard, 0.48 on public leaderboard but I had not selected it as it socre lower on local CV setup.</p>\n<p><a href=\"https://www.kaggle.com/code/adityakumarsinha/wavenet-subm-focal-v1?scriptVersionId=132385797\" target=\"_blank\">https://www.kaggle.com/code/adityakumarsinha/wavenet-subm-focal-v1?scriptVersionId=132385797</a></p>\n<p>I have used both defog and tDCS fog ( resampled at 100 Hz) data for training the models. <br>\nFor training the series is divided in multiple windows of size 2000 with overlap of 500. For single epoch I randomly chose one window for tDCS fog data and 4 windows for defog data. Interestingly when I sampled defog data with Validation column set as True the local CV score was lower so I sticked to do training with complete data.</p>\n<p>While inference the series is divided into segment of length 20000 and then predicted. In my local CV setup and public result I found that score is higher for longer time series so based on experiment I used 20000 and 16000 segment size, it means most of the complete tDCS series is predicted at once.</p>\n<p>Now i like to mention two interesting thing happened to me:</p>\n<ol>\n<li>I exhausted my Kaggle GPU quota, so last 3-4 submission I have used to OpenVino for CPU based inferencing.  (Thanks for inferencing notebooks of BirdClef competition). This limitation also hindered me to try more complex models and prediction techniques (prediction on sliding window and then aggregating). <br>\nSo I request Kaggle to reserve some GPU quota only for submission purpose. </li>\n<li>I have done 1 pre training on dailiy living with target of predicting next element in the series and used the weights to do normal training. I found that even though  local cv score is lower for this model but its ensemble with improved competition metrics a lot for both local CV and public leader board but not so with private leaderboard and thus drop in my ranking on private leader board 😔</li>\n</ol>\n<p>Both of my final submission scored <strong>0.389</strong> on the private leader board  and its an ensemble that  included the model I mentioned in point 2 and it was definitely over-fitting o on public leaderboard.</p>\n<p>In the end thanks for the competition organizer to provide interesting dataset which will ultimately help people with Parkinson disease.</p>\n<p>This is my first individual Gold Medal and I am still \"in the money\" rank, so ultimately feeling good and excited.</p>",
      "rawMarkdown": "I have entered quite late in the competition and my first submission is just 5 days before the competition deadline. I feel a bit lucky as initial model architecture selection has resulted in good score. \n\nI started this competition as competition data is time series and it is provide possibility to model the objective in many possible ways, 1D U-Net, Transformer based model, Spectrogram based modelling,  WaveNet and many more. \nI also feel that once involved then you go through the winning solutions and learn so many things.\n\nAs I have limited time I started with model that was used previously in IonSwitching competition, Wavenet + GRU (Wavenet). The competition had similar point wise prediction requirement.\n**Single 5 Fold model** with Binary Focal Loss scored 0.42 on private leaderboard, 0.48 on public leaderboard but I had not selected it as it socre lower on local CV setup.\n\nhttps://www.kaggle.com/code/adityakumarsinha/wavenet-subm-focal-v1?scriptVersionId=132385797\n\nI have used both defog and tDCS fog ( resampled at 100 Hz) data for training the models. \nFor training the series is divided in multiple windows of size 2000 with overlap of 500. For single epoch I randomly chose one window for tDCS fog data and 4 windows for defog data. Interestingly when I sampled defog data with Validation column set as True the local CV score was lower so I sticked to do training with complete data.\n\nWhile inference the series is divided into segment of length 20000 and then predicted. In my local CV setup and public result I found that score is higher for longer time series so based on experiment I used 20000 and 16000 segment size, it means most of the complete tDCS series is predicted at once.\n\nNow i like to mention two interesting thing happened to me:\n1. I exhausted my Kaggle GPU quota, so last 3-4 submission I have used to OpenVino for CPU based inferencing.  (Thanks for inferencing notebooks of BirdClef competition). This limitation also hindered me to try more complex models and prediction techniques (prediction on sliding window and then aggregating). \nSo I request Kaggle to reserve some GPU quota only for submission purpose. \n2. I have done 1 pre training on dailiy living with target of predicting next element in the series and used the weights to do normal training. I found that even though  local cv score is lower for this model but its ensemble with improved competition metrics a lot for both local CV and public leader board but not so with private leaderboard and thus drop in my ranking on private leader board 😔\n\nBoth of my final submission scored **0.389** on the private leader board  and its an ensemble that  included the model I mentioned in point 2 and it was definitely over-fitting o on public leaderboard.\n\n\nIn the end thanks for the competition organizer to provide interesting dataset which will ultimately help people with Parkinson disease.\n\nThis is my first individual Gold Medal and I am still \"in the money\" rank, so ultimately feeling good and excited.",
      "votes": null
    },
    {
      "id": "2296620",
      "postDate": "06/12/2023 02:33:06",
      "content": "<p>Hi Inner Voice, Thank you for sharing the wonderful solution!</p>\n<p>I have some questions. I noticed in the notebook you shared, there's a step where the waveform is divided by 40. Is this similar to performing a max-min scaling?<br>\nAnd, the amplitude ranges of the three waveforms slightly vary. Did you uniformly set it to 40 because its the best CV results?</p>",
      "rawMarkdown": "Hi Inner Voice, Thank you for sharing the wonderful solution!\n\nI have some questions. I noticed in the notebook you shared, there's a step where the waveform is divided by 40. Is this similar to performing a max-min scaling?\nAnd, the amplitude ranges of the three waveforms slightly vary. Did you uniformly set it to 40 because its the best CV results?",
      "votes": null
    },
    {
      "id": "2296641",
      "postDate": "06/12/2023 03:17:58",
      "content": "<p>Yes it's kind of min max scaling. Not experimented with this value, just kept it for simicity during initial modelling.</p>",
      "rawMarkdown": "Yes it's kind of min max scaling. Not experimented with this value, just kept it for simicity during initial modelling.",
      "votes": null
    },
    {
      "id": "2296743",
      "postDate": "06/12/2023 05:47:17",
      "content": "<p>Thank you for answering!</p>",
      "rawMarkdown": "Thank you for answering!",
      "votes": null
    },
    {
      "id": "2296853",
      "postDate": "06/12/2023 07:49:12",
      "content": "<p>Hey Innervoice, congrats to your strong finish of the comp. You method just looks simple but effective! <br>\nI am wondering if your could share your training scripts on GitHub or somewhere else. I would like to see more details of your method, thank!</p>",
      "rawMarkdown": "Hey Innervoice, congrats to your strong finish of the comp. You method just looks simple but effective! \nI am wondering if your could share your training scripts on GitHub or somewhere else. I would like to see more details of your method, thank!",
      "votes": null
    },
    {
      "id": "2296955",
      "postDate": "06/12/2023 09:26:25",
      "content": "<p>Will upload the training script in coming days.</p>",
      "rawMarkdown": "Will upload the training script in coming days.",
      "votes": null
    },
    {
      "id": "2297042",
      "postDate": "06/12/2023 10:37:01",
      "content": "<p>Great job on achieving a 5th place finish with your Wavenet + GRU model! It's impressive that you were able to adapt a previous model architecture to the current competition and achieve such promising results. Your use of the Binary Focal Loss and the inclusion of both defog and tDCS fog data for training also shows your attention to detail. Keep up the excellent work!</p>",
      "rawMarkdown": "Great job on achieving a 5th place finish with your Wavenet + GRU model! It's impressive that you were able to adapt a previous model architecture to the current competition and achieve such promising results. Your use of the Binary Focal Loss and the inclusion of both defog and tDCS fog data for training also shows your attention to detail. Keep up the excellent work!",
      "votes": null
    },
    {
      "id": "2304775",
      "postDate": "06/16/2023 08:23:22",
      "content": "<p>Nice going <a href=\"https://www.kaggle.com/adityakumarsinha\" target=\"_blank\">@adityakumarsinha</a> I tried adapting WaveNet myself but failed, glad to see it works! Also interested in training script!</p>",
      "rawMarkdown": "Nice going @adityakumarsinha I tried adapting WaveNet myself but failed, glad to see it works! Also interested in training script!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2296620,
      "author_name": "kotarojp",
      "author_url": "",
      "post_date": "06/12/2023 02:33:06",
      "content": "<p>Hi Inner Voice, Thank you for sharing the wonderful solution!</p>\n<p>I have some questions. I noticed in the notebook you shared, there's a step where the waveform is divided by 40. Is this similar to performing a max-min scaling?<br>\nAnd, the amplitude ranges of the three waveforms slightly vary. Did you uniformly set it to 40 because its the best CV results?</p>",
      "votes": null,
      "replies": [
        {
          "id": 2296641,
          "author_name": "adityakumarsinha",
          "author_url": "",
          "post_date": "06/12/2023 03:17:58",
          "content": "<p>Yes it's kind of min max scaling. Not experimented with this value, just kept it for simicity during initial modelling.</p>",
          "votes": null,
          "replies": [
            {
              "id": 2296743,
              "author_name": "kotarojp",
              "author_url": "",
              "post_date": "06/12/2023 05:47:17",
              "content": "<p>Thank you for answering!</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2296853,
      "author_name": "waylongo",
      "author_url": "",
      "post_date": "06/12/2023 07:49:12",
      "content": "<p>Hey Innervoice, congrats to your strong finish of the comp. You method just looks simple but effective! <br>\nI am wondering if your could share your training scripts on GitHub or somewhere else. I would like to see more details of your method, thank!</p>",
      "votes": null,
      "replies": [
        {
          "id": 2296955,
          "author_name": "adityakumarsinha",
          "author_url": "",
          "post_date": "06/12/2023 09:26:25",
          "content": "<p>Will upload the training script in coming days.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2297042,
      "author_name": "poojach7611",
      "author_url": "",
      "post_date": "06/12/2023 10:37:01",
      "content": "<p>Great job on achieving a 5th place finish with your Wavenet + GRU model! It's impressive that you were able to adapt a previous model architecture to the current competition and achieve such promising results. Your use of the Binary Focal Loss and the inclusion of both defog and tDCS fog data for training also shows your attention to detail. Keep up the excellent work!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2304775,
      "author_name": "exjustice",
      "author_url": "",
      "post_date": "06/16/2023 08:23:22",
      "content": "<p>Nice going <a href=\"https://www.kaggle.com/adityakumarsinha\" target=\"_blank\">@adityakumarsinha</a> I tried adapting WaveNet myself but failed, glad to see it works! Also interested in training script!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2295150": "I have entered quite late in the competition and my first submission is just 5 days before the competition deadline. I feel a bit lucky as initial model architecture selection has resulted in good score. \n\nI started this competition as competition data is time series and it is provide possibility to model the objective in many possible ways, 1D U-Net, Transformer based model, Spectrogram based modelling,  WaveNet and many more. \nI also feel that once involved then you go through the winning solutions and learn so many things.\n\nAs I have limited time I started with model that was used previously in IonSwitching competition, Wavenet + GRU (Wavenet). The competition had similar point wise prediction requirement.\n**Single 5 Fold model** with Binary Focal Loss scored 0.42 on private leaderboard, 0.48 on public leaderboard but I had not selected it as it socre lower on local CV setup.\n\nhttps://www.kaggle.com/code/adityakumarsinha/wavenet-subm-focal-v1?scriptVersionId=132385797\n\nI have used both defog and tDCS fog ( resampled at 100 Hz) data for training the models. \nFor training the series is divided in multiple windows of size 2000 with overlap of 500. For single epoch I randomly chose one window for tDCS fog data and 4 windows for defog data. Interestingly when I sampled defog data with Validation column set as True the local CV score was lower so I sticked to do training with complete data.\n\nWhile inference the series is divided into segment of length 20000 and then predicted. In my local CV setup and public result I found that score is higher for longer time series so based on experiment I used 20000 and 16000 segment size, it means most of the complete tDCS series is predicted at once.\n\nNow i like to mention two interesting thing happened to me:\n1. I exhausted my Kaggle GPU quota, so last 3-4 submission I have used to OpenVino for CPU based inferencing.  (Thanks for inferencing notebooks of BirdClef competition). This limitation also hindered me to try more complex models and prediction techniques (prediction on sliding window and then aggregating). \nSo I request Kaggle to reserve some GPU quota only for submission purpose. \n2. I have done 1 pre training on dailiy living with target of predicting next element in the series and used the weights to do normal training. I found that even though  local cv score is lower for this model but its ensemble with improved competition metrics a lot for both local CV and public leader board but not so with private leaderboard and thus drop in my ranking on private leader board 😔\n\nBoth of my final submission scored **0.389** on the private leader board  and its an ensemble that  included the model I mentioned in point 2 and it was definitely over-fitting o on public leaderboard.\n\n\nIn the end thanks for the competition organizer to provide interesting dataset which will ultimately help people with Parkinson disease.\n\nThis is my first individual Gold Medal and I am still \"in the money\" rank, so ultimately feeling good and excited.",
    "2296620": "Hi Inner Voice, Thank you for sharing the wonderful solution!\n\nI have some questions. I noticed in the notebook you shared, there's a step where the waveform is divided by 40. Is this similar to performing a max-min scaling?\nAnd, the amplitude ranges of the three waveforms slightly vary. Did you uniformly set it to 40 because its the best CV results?",
    "2296641": "Yes it's kind of min max scaling. Not experimented with this value, just kept it for simicity during initial modelling.",
    "2296743": "Thank you for answering!",
    "2296853": "Hey Innervoice, congrats to your strong finish of the comp. You method just looks simple but effective! \nI am wondering if your could share your training scripts on GitHub or somewhere else. I would like to see more details of your method, thank!",
    "2296955": "Will upload the training script in coming days.",
    "2297042": "Great job on achieving a 5th place finish with your Wavenet + GRU model! It's impressive that you were able to adapt a previous model architecture to the current competition and achieve such promising results. Your use of the Binary Focal Loss and the inclusion of both defog and tDCS fog data for training also shows your attention to detail. Keep up the excellent work!",
    "2304775": "Nice going @adityakumarsinha I tried adapting WaveNet myself but failed, glad to see it works! Also interested in training script!"
  },
  "source": "meta"
}