{
  "id": 459742,
  "title": "9th Place (Youri' part; some post-processing)",
  "url": "/competitions/child-mind-institute-detect-sleep-states/discussion/459742",
  "author_name": "",
  "post_date": "2023-12-06T13:09:01.322340400Z",
  "votes": 28,
  "comment_count": 1,
  "views": 0,
  "content": "<p>my model did not get included in the final team's submission - it was predicting sleep/awake indicator, and could not be easily combined with models of others, which were all predicting onset/wakeup events.</p>\n<p>But here are some post-processing adjustments i used:</p>\n<ol>\n<li><p>do not predict exact minute or exact half-minute. This was discussed in  <a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/446919\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/446919</a>.<br>\nThat is because evaluation metric does not consider prediction a match if it is located exactly \"tolerance\" away from true event. And since true events are all on exact minute mark, and tolerances are mostly in exact minutes (some are in half-minutes), shifting the prediction off exact minute mark makes it possible to match to two true events instead of 1.<br>\nstep -= ((step%12)==0) * 1<br>\nstep -= ((step%12)==6) * 1</p></li>\n<li><p>adjust predicted step to better align with 15-minute pattern of events.This was discussed in <a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/444374\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/444374</a>.<br>\nIf predicted event falls on minutes that have low empirical probability of true events, we shift it up or down a minute.<br>\ne15 = event_name[0] + str((step//12)%15)<br>\nstep -= 12 * (e15 in ['o1', 'o8', 'o9', 'w0', 'w4', 'w8', 'w12'])<br>\nstep += 12 * (e15 in ['o4', 'o12', 'w1', 'w5', 'w9', 'w13'])<br>\nI tried some improvements to this simple approach, but nothing worked. So this is what we ended up using in our final submission.</p></li>\n</ol>",
  "messages": [
    {
      "id": "2551017",
      "postDate": "12/06/2023 13:09:01",
      "content": "<p>my model did not get included in the final team's submission - it was predicting sleep/awake indicator, and could not be easily combined with models of others, which were all predicting onset/wakeup events.</p>\n<p>But here are some post-processing adjustments i used:</p>\n<ol>\n<li><p>do not predict exact minute or exact half-minute. This was discussed in  <a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/446919\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/446919</a>.<br>\nThat is because evaluation metric does not consider prediction a match if it is located exactly \"tolerance\" away from true event. And since true events are all on exact minute mark, and tolerances are mostly in exact minutes (some are in half-minutes), shifting the prediction off exact minute mark makes it possible to match to two true events instead of 1.<br>\nstep -= ((step%12)==0) * 1<br>\nstep -= ((step%12)==6) * 1</p></li>\n<li><p>adjust predicted step to better align with 15-minute pattern of events.This was discussed in <a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/444374\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/444374</a>.<br>\nIf predicted event falls on minutes that have low empirical probability of true events, we shift it up or down a minute.<br>\ne15 = event_name[0] + str((step//12)%15)<br>\nstep -= 12 * (e15 in ['o1', 'o8', 'o9', 'w0', 'w4', 'w8', 'w12'])<br>\nstep += 12 * (e15 in ['o4', 'o12', 'w1', 'w5', 'w9', 'w13'])<br>\nI tried some improvements to this simple approach, but nothing worked. So this is what we ended up using in our final submission.</p></li>\n</ol>",
      "rawMarkdown": "my model did not get included in the final team's submission - it was predicting sleep/awake indicator, and could not be easily combined with models of others, which were all predicting onset/wakeup events.\n\nBut here are some post-processing adjustments i used:\n\n1. do not predict exact minute or exact half-minute. This was discussed in  https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/446919.\nThat is because evaluation metric does not consider prediction a match if it is located exactly \"tolerance\" away from true event. And since true events are all on exact minute mark, and tolerances are mostly in exact minutes (some are in half-minutes), shifting the prediction off exact minute mark makes it possible to match to two true events instead of 1.\nstep -= ((step%12)==0) * 1\nstep -= ((step%12)==6) * 1\n\n2. adjust predicted step to better align with 15-minute pattern of events.This was discussed in https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/444374.\nIf predicted event falls on minutes that have low empirical probability of true events, we shift it up or down a minute.\ne15 = event_name[0] + str((step//12)%15)\nstep -= 12 * (e15 in ['o1', 'o8', 'o9', 'w0', 'w4', 'w8', 'w12'])\nstep += 12 * (e15 in ['o4', 'o12', 'w1', 'w5', 'w9', 'w13'])\nI tried some improvements to this simple approach, but nothing worked. So this is what we ended up using in our final submission.",
      "votes": null
    },
    {
      "id": "2551205",
      "postDate": "12/06/2023 14:57:55",
      "content": "<p><a href=\"https://www.kaggle.com/ymatioun\" target=\"_blank\">@ymatioun</a> : thanks for the good clues as well as sharing your knowledge/findings! Once again, congratulations on the high rank in this contest!</p>",
      "rawMarkdown": "ymatioun : thanks for the good clues as well as sharing your knowledge/findings! Once again, congratulations on the high rank in this contest!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2551205,
      "author_name": "gvyshnya",
      "author_url": "",
      "post_date": "12/06/2023 14:57:55",
      "content": "<p><a href=\"https://www.kaggle.com/ymatioun\" target=\"_blank\">@ymatioun</a> : thanks for the good clues as well as sharing your knowledge/findings! Once again, congratulations on the high rank in this contest!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2551017": "my model did not get included in the final team's submission - it was predicting sleep/awake indicator, and could not be easily combined with models of others, which were all predicting onset/wakeup events.\n\nBut here are some post-processing adjustments i used:\n\n1. do not predict exact minute or exact half-minute. This was discussed in  https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/446919.\nThat is because evaluation metric does not consider prediction a match if it is located exactly \"tolerance\" away from true event. And since true events are all on exact minute mark, and tolerances are mostly in exact minutes (some are in half-minutes), shifting the prediction off exact minute mark makes it possible to match to two true events instead of 1.\nstep -= ((step%12)==0) * 1\nstep -= ((step%12)==6) * 1\n\n2. adjust predicted step to better align with 15-minute pattern of events.This was discussed in https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/444374.\nIf predicted event falls on minutes that have low empirical probability of true events, we shift it up or down a minute.\ne15 = event_name[0] + str((step//12)%15)\nstep -= 12 * (e15 in ['o1', 'o8', 'o9', 'w0', 'w4', 'w8', 'w12'])\nstep += 12 * (e15 in ['o4', 'o12', 'w1', 'w5', 'w9', 'w13'])\nI tried some improvements to this simple approach, but nothing worked. So this is what we ended up using in our final submission.",
    "2551205": "ymatioun : thanks for the good clues as well as sharing your knowledge/findings! Once again, congratulations on the high rank in this contest!"
  },
  "source": "meta"
}