{
  "id": 460730,
  "title": "146th place solution",
  "url": "/competitions/child-mind-institute-detect-sleep-states/discussion/460730",
  "author_name": "2g",
  "post_date": "2023-12-10T21:50:57.841000",
  "votes": 3,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I'd like to extend my gratitude to the organizers and congratulate all participants.</p>\n<p>My solution builds upon the code by <a href=\"https://www.kaggle.com/tubotubo\" target=\"_blank\">@tubotubo</a>. I gained insights into developing deep learning code from his program and am thankful for his willingness to share such excellent code!</p>\n<p><a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/452940\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/452940</a></p>\n<h2>My solution</h2>\n<p>Here are my strategies for improving the score (although most of my ideas did not yield the expected results):<br>\n<a href=\"https://www.kaggle.com/code/ystsuji/cmi-fold-ensembliing-inference/\" target=\"_blank\">https://www.kaggle.com/code/ystsuji/cmi-fold-ensembliing-inference/</a></p>\n<h3>Ensemble Folds</h3>\n<p>I calculated the average score for each fold and identified peaks using find_peaks.</p>\n<h3>Remove Predictions in Dummy Signals</h3>\n<p>After obtaining predictions, those in periods with repeating signals were removed. The mean and variance of each signal (enmo, anglez) per day were analyzed to determine if they were repeating signals.</p>\n<h2>A Tip That Did Not Work</h2>\n<p>It turned out to be ineffective, but I welcome any feedback:</p>\n<ul>\n<li>Feature Engineering<ul>\n<li>Taking the absolute value of angle differences.</li>\n<li>Clipping the enmo value to the 95th percentile.</li>\n<li>Creating features through unsupervised time series segmentation (<a href=\"https://github.com/ermshaua/claspy\" target=\"_blank\">claspy</a>) -&gt; insufficient time in Kaggle notebook to develop features.</li>\n<li>Flagging features of repeating signals.</li>\n<li>Entropy of enmo (inspired by <a href=\"https://www.nature.com/articles/s41598-020-79217-x\" target=\"_blank\">this article</a>).</li></ul></li>\n<li>Hyperparameter Tuning<ul>\n<li>Adjusting the duration.</li>\n<li>Modifying parameters in find_peaks.</li></ul></li>\n<li>Post-processing<ul>\n<li>Removing onset (wakeup) predictions sandwiched between other wakeup predictions.</li></ul></li>\n<li>Others<ul>\n<li>Correcting the timezone to local time.</li></ul></li>\n</ul>",
  "messages": [
    {
      "id": 2556639,
      "postDate": "2023-12-10T21:50:57.843Z",
      "content": "<p>I'd like to extend my gratitude to the organizers and congratulate all participants.</p>\n<p>My solution builds upon the code by <a href=\"https://www.kaggle.com/tubotubo\" target=\"_blank\">@tubotubo</a>. I gained insights into developing deep learning code from his program and am thankful for his willingness to share such excellent code!</p>\n<p><a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/452940\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/452940</a></p>\n<h2>My solution</h2>\n<p>Here are my strategies for improving the score (although most of my ideas did not yield the expected results):<br>\n<a href=\"https://www.kaggle.com/code/ystsuji/cmi-fold-ensembliing-inference/\" target=\"_blank\">https://www.kaggle.com/code/ystsuji/cmi-fold-ensembliing-inference/</a></p>\n<h3>Ensemble Folds</h3>\n<p>I calculated the average score for each fold and identified peaks using find_peaks.</p>\n<h3>Remove Predictions in Dummy Signals</h3>\n<p>After obtaining predictions, those in periods with repeating signals were removed. The mean and variance of each signal (enmo, anglez) per day were analyzed to determine if they were repeating signals.</p>\n<h2>A Tip That Did Not Work</h2>\n<p>It turned out to be ineffective, but I welcome any feedback:</p>\n<ul>\n<li>Feature Engineering<ul>\n<li>Taking the absolute value of angle differences.</li>\n<li>Clipping the enmo value to the 95th percentile.</li>\n<li>Creating features through unsupervised time series segmentation (<a href=\"https://github.com/ermshaua/claspy\" target=\"_blank\">claspy</a>) -&gt; insufficient time in Kaggle notebook to develop features.</li>\n<li>Flagging features of repeating signals.</li>\n<li>Entropy of enmo (inspired by <a href=\"https://www.nature.com/articles/s41598-020-79217-x\" target=\"_blank\">this article</a>).</li></ul></li>\n<li>Hyperparameter Tuning<ul>\n<li>Adjusting the duration.</li>\n<li>Modifying parameters in find_peaks.</li></ul></li>\n<li>Post-processing<ul>\n<li>Removing onset (wakeup) predictions sandwiched between other wakeup predictions.</li></ul></li>\n<li>Others<ul>\n<li>Correcting the timezone to local time.</li></ul></li>\n</ul>",
      "rawMarkdown": "I'd like to extend my gratitude to the organizers and congratulate all participants.\n\nMy solution builds upon the code by @tubotubo. I gained insights into developing deep learning code from his program and am thankful for his willingness to share such excellent code!\n\nhttps://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/452940\n\n\n## My solution\n\nHere are my strategies for improving the score (although most of my ideas did not yield the expected results):\nhttps://www.kaggle.com/code/ystsuji/cmi-fold-ensembliing-inference/\n\n### Ensemble Folds\nI calculated the average score for each fold and identified peaks using find_peaks.\n\n### Remove Predictions in Dummy Signals\nAfter obtaining predictions, those in periods with repeating signals were removed. The mean and variance of each signal (enmo, anglez) per day were analyzed to determine if they were repeating signals.\n\n## A Tip That Did Not Work\nIt turned out to be ineffective, but I welcome any feedback:\n\n- Feature Engineering\n    - Taking the absolute value of angle differences.\n    - Clipping the enmo value to the 95th percentile.\n    - Creating features through unsupervised time series segmentation ([claspy](https://github.com/ermshaua/claspy)) -> insufficient time in Kaggle notebook to develop features.\n    - Flagging features of repeating signals.\n    - Entropy of enmo (inspired by [this article](https://www.nature.com/articles/s41598-020-79217-x)).\n- Hyperparameter Tuning\n    - Adjusting the duration.\n    - Modifying parameters in find_peaks.\n- Post-processing\n    - Removing onset (wakeup) predictions sandwiched between other wakeup predictions.\n- Others\n    - Correcting the timezone to local time.\n",
      "votes": 3
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2556639": "I'd like to extend my gratitude to the organizers and congratulate all participants.\n\nMy solution builds upon the code by @tubotubo. I gained insights into developing deep learning code from his program and am thankful for his willingness to share such excellent code!\n\nhttps://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/discussion/452940\n\n\n## My solution\n\nHere are my strategies for improving the score (although most of my ideas did not yield the expected results):\nhttps://www.kaggle.com/code/ystsuji/cmi-fold-ensembliing-inference/\n\n### Ensemble Folds\nI calculated the average score for each fold and identified peaks using find_peaks.\n\n### Remove Predictions in Dummy Signals\nAfter obtaining predictions, those in periods with repeating signals were removed. The mean and variance of each signal (enmo, anglez) per day were analyzed to determine if they were repeating signals.\n\n## A Tip That Did Not Work\nIt turned out to be ineffective, but I welcome any feedback:\n\n- Feature Engineering\n    - Taking the absolute value of angle differences.\n    - Clipping the enmo value to the 95th percentile.\n    - Creating features through unsupervised time series segmentation ([claspy](https://github.com/ermshaua/claspy)) -> insufficient time in Kaggle notebook to develop features.\n    - Flagging features of repeating signals.\n    - Entropy of enmo (inspired by [this article](https://www.nature.com/articles/s41598-020-79217-x)).\n- Hyperparameter Tuning\n    - Adjusting the duration.\n    - Modifying parameters in find_peaks.\n- Post-processing\n    - Removing onset (wakeup) predictions sandwiched between other wakeup predictions.\n- Others\n    - Correcting the timezone to local time.\n"
  },
  "complete": true,
  "source": "existing_discussion",
  "competition_id": 53666,
  "competition_slug": "child-mind-institute-detect-sleep-states",
  "team_id": 11130032,
  "solution_url": "/competitions/child-mind-institute-detect-sleep-states/writeups/2g-146th-place-solution"
}