{
  "id": 462411,
  "title": "685th Place Solution for the Child Mind Institute - Detect Sleep States Competition",
  "url": "/competitions/child-mind-institute-detect-sleep-states/discussion/462411",
  "author_name": "",
  "post_date": "2023-12-19T19:44:41.117000",
  "votes": 5,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I would like to express gratitude to Kaggle for hosting the competition and Child Mind Institute for providing a dataset. </p>\n<p>I'm so grateful to 213TUBO for sharing the public notebook <a href=\"https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724\" target=\"_blank\">https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724</a>.<br>\nI gained a lot of knowledge from github <a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states</a>.</p>\n<h1>Context</h1>\n<p>•    Business context: <a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/overview\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/overview</a><br>\n•    Data context: <a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/data\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/data</a></p>\n<h1>Overview of the approach</h1>\n<h2>The models</h2>\n<p>The framework Torch, models UNet, and AutoModel were used.</p>\n<table>\n<thead>\n<tr>\n<th>Owner</th>\n<th>Github</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>213TUBO</td>\n<td><a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/tree/main/src/models\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/tree/main/src/models</a></td>\n</tr>\n</tbody>\n</table>\n<pre><code> src.models.detr2D  DETR2DCNN\n src.models.spec1D  Spec1D\n src.models.spec2Dcnn  Spec2DCNN\n src.models.transformerautomodel  TransformerAutoModel\n src.models.centernet  CenterNet\n</code></pre>\n<h2>Data preprocessing, feature engineering:</h2>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Score th</td>\n<td>0.02</td>\n</tr>\n<tr>\n<td>Distance</td>\n<td>10</td>\n</tr>\n</tbody>\n</table>\n<p>Add feature:</p>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Function</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Anglez, enmo</td>\n<td>diff</td>\n</tr>\n<tr>\n<td>Anglez, enmo</td>\n<td>mean, avg</td>\n</tr>\n<tr>\n<td>Hour</td>\n<td>sin, cos</td>\n</tr>\n</tbody>\n</table>\n<h2>Augmentations:</h2>\n<table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Name</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Mixup</td>\n<td>prob</td>\n<td>0.0</td>\n</tr>\n<tr>\n<td>Mixup</td>\n<td>alpha</td>\n<td>0.4</td>\n</tr>\n<tr>\n<td>Cutmix</td>\n<td>prob</td>\n<td>0.0</td>\n</tr>\n<tr>\n<td>Cutmix</td>\n<td>alpha</td>\n<td>0.4</td>\n</tr>\n</tbody>\n</table>\n<h2>Validation Strategy</h2>\n<p>Use a train_series_ids and a valid_series_ids.<br>\nThe rate of downsample is 2.</p>\n<h1>Details of the submission</h1>\n<p><a href=\"https://www.kaggle.com/code/emmawilsonev/cmi-submit/edit/run/153313645\" target=\"_blank\">https://www.kaggle.com/code/emmawilsonev/cmi-submit/edit/run/153313645</a></p>\n<table>\n<thead>\n<tr>\n<th>Private Score</th>\n<th>Public Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0.728</td>\n<td>0.707</td>\n</tr>\n</tbody>\n</table>\n<h2>Code samples model training:</h2>\n<table>\n<thead>\n<tr>\n<th>Training/Configuration</th>\n<th>Code</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Training</td>\n<td><a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/src/modelmodule.py\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/src/modelmodule.py</a></td>\n</tr>\n<tr>\n<td>Configuration</td>\n<td><a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/conf/train.yaml#L41\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/conf/train.yaml#L41</a></td>\n</tr>\n</tbody>\n</table>\n<p>Configuration:</p>\n<table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>epochs</td>\n<td>50</td>\n</tr>\n<tr>\n<td>gradient_clip_val</td>\n<td>1.0</td>\n</tr>\n<tr>\n<td>lr</td>\n<td>0.0005</td>\n</tr>\n</tbody>\n</table>\n<h2>Code samples feature engineering:</h2>\n<pre><code>num_frames = upsampled_num_frames  downsample_rate\n</code></pre>\n<pre><code>     onset, wakeup  this_event_df[[, ]].to_numpy():\n        onset_pos = ((onset - start) / duration * num_frames)\n        onset_offset = (onset - start) / duration * num_frames - onset_pos\n        wakeup_pos = ((wakeup - start) / duration * num_frames)\n        wakeup_offset = (wakeup - start) / duration * num_frames - wakeup_pos\n\n        bbox_size = ((wakeup_pos, num_frames) - (onset_pos, )) / num_frames\n</code></pre>\n<h2>Code samples model inference:</h2>\n<pre><code>        feature_extractor = get_feature_extractor(\n            cfg.feature_extractor, feature_dim, num_timesteps\n        )\n        decoder = get_decoder(cfg.decoder, feature_extractor.height, n_classes, num_timesteps)\n        model = Spec2DCNN(\n            feature_extractor=feature_extractor,\n            decoder=decoder,\n            in_channels=feature_extractor.out_chans,\n            mixup_alpha=cfg.aug.mixup_alpha,\n            cutmix_alpha=cfg.aug.cutmix_alpha,\n            **cfg.model.params,\n        )\n</code></pre>\n<h2>What was impactful about the submission.</h2>\n<p>Grait concept 213TUBO concerning sin and cos:<br>\n<a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/prepare_data.py\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/prepare_data.py</a></p>\n<h2>What was tried and didn’t work.</h2>\n<p>Skillet-learn gradient boosting.</p>\n<h2>Helpful notebooks:</h2>\n<table>\n<thead>\n<tr>\n<th>Author</th>\n<th>notebook/github</th>\n<th>link</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>213TUBO</td>\n<td>notebook</td>\n<td><a href=\"https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724\" target=\"_blank\">https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724</a></td>\n</tr>\n<tr>\n<td>213TUBO</td>\n<td>github</td>\n<td><a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states</a></td>\n</tr>\n</tbody>\n</table>\n<p>Thank you for reading.</p>",
  "messages": [
    {
      "id": 2567628,
      "postDate": "2023-12-19T19:44:41.117Z",
      "content": "<p>I would like to express gratitude to Kaggle for hosting the competition and Child Mind Institute for providing a dataset. </p>\n<p>I'm so grateful to 213TUBO for sharing the public notebook <a href=\"https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724\" target=\"_blank\">https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724</a>.<br>\nI gained a lot of knowledge from github <a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states</a>.</p>\n<h1>Context</h1>\n<p>•    Business context: <a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/overview\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/overview</a><br>\n•    Data context: <a href=\"https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/data\" target=\"_blank\">https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/data</a></p>\n<h1>Overview of the approach</h1>\n<h2>The models</h2>\n<p>The framework Torch, models UNet, and AutoModel were used.</p>\n<table>\n<thead>\n<tr>\n<th>Owner</th>\n<th>Github</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>213TUBO</td>\n<td><a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/tree/main/src/models\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/tree/main/src/models</a></td>\n</tr>\n</tbody>\n</table>\n<pre><code> src.models.detr2D  DETR2DCNN\n src.models.spec1D  Spec1D\n src.models.spec2Dcnn  Spec2DCNN\n src.models.transformerautomodel  TransformerAutoModel\n src.models.centernet  CenterNet\n</code></pre>\n<h2>Data preprocessing, feature engineering:</h2>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Score th</td>\n<td>0.02</td>\n</tr>\n<tr>\n<td>Distance</td>\n<td>10</td>\n</tr>\n</tbody>\n</table>\n<p>Add feature:</p>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Function</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Anglez, enmo</td>\n<td>diff</td>\n</tr>\n<tr>\n<td>Anglez, enmo</td>\n<td>mean, avg</td>\n</tr>\n<tr>\n<td>Hour</td>\n<td>sin, cos</td>\n</tr>\n</tbody>\n</table>\n<h2>Augmentations:</h2>\n<table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Name</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Mixup</td>\n<td>prob</td>\n<td>0.0</td>\n</tr>\n<tr>\n<td>Mixup</td>\n<td>alpha</td>\n<td>0.4</td>\n</tr>\n<tr>\n<td>Cutmix</td>\n<td>prob</td>\n<td>0.0</td>\n</tr>\n<tr>\n<td>Cutmix</td>\n<td>alpha</td>\n<td>0.4</td>\n</tr>\n</tbody>\n</table>\n<h2>Validation Strategy</h2>\n<p>Use a train_series_ids and a valid_series_ids.<br>\nThe rate of downsample is 2.</p>\n<h1>Details of the submission</h1>\n<p><a href=\"https://www.kaggle.com/code/emmawilsonev/cmi-submit/edit/run/153313645\" target=\"_blank\">https://www.kaggle.com/code/emmawilsonev/cmi-submit/edit/run/153313645</a></p>\n<table>\n<thead>\n<tr>\n<th>Private Score</th>\n<th>Public Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0.728</td>\n<td>0.707</td>\n</tr>\n</tbody>\n</table>\n<h2>Code samples model training:</h2>\n<table>\n<thead>\n<tr>\n<th>Training/Configuration</th>\n<th>Code</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Training</td>\n<td><a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/src/modelmodule.py\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/src/modelmodule.py</a></td>\n</tr>\n<tr>\n<td>Configuration</td>\n<td><a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/conf/train.yaml#L41\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/conf/train.yaml#L41</a></td>\n</tr>\n</tbody>\n</table>\n<p>Configuration:</p>\n<table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>epochs</td>\n<td>50</td>\n</tr>\n<tr>\n<td>gradient_clip_val</td>\n<td>1.0</td>\n</tr>\n<tr>\n<td>lr</td>\n<td>0.0005</td>\n</tr>\n</tbody>\n</table>\n<h2>Code samples feature engineering:</h2>\n<pre><code>num_frames = upsampled_num_frames  downsample_rate\n</code></pre>\n<pre><code>     onset, wakeup  this_event_df[[, ]].to_numpy():\n        onset_pos = ((onset - start) / duration * num_frames)\n        onset_offset = (onset - start) / duration * num_frames - onset_pos\n        wakeup_pos = ((wakeup - start) / duration * num_frames)\n        wakeup_offset = (wakeup - start) / duration * num_frames - wakeup_pos\n\n        bbox_size = ((wakeup_pos, num_frames) - (onset_pos, )) / num_frames\n</code></pre>\n<h2>Code samples model inference:</h2>\n<pre><code>        feature_extractor = get_feature_extractor(\n            cfg.feature_extractor, feature_dim, num_timesteps\n        )\n        decoder = get_decoder(cfg.decoder, feature_extractor.height, n_classes, num_timesteps)\n        model = Spec2DCNN(\n            feature_extractor=feature_extractor,\n            decoder=decoder,\n            in_channels=feature_extractor.out_chans,\n            mixup_alpha=cfg.aug.mixup_alpha,\n            cutmix_alpha=cfg.aug.cutmix_alpha,\n            **cfg.model.params,\n        )\n</code></pre>\n<h2>What was impactful about the submission.</h2>\n<p>Grait concept 213TUBO concerning sin and cos:<br>\n<a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/prepare_data.py\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/prepare_data.py</a></p>\n<h2>What was tried and didn’t work.</h2>\n<p>Skillet-learn gradient boosting.</p>\n<h2>Helpful notebooks:</h2>\n<table>\n<thead>\n<tr>\n<th>Author</th>\n<th>notebook/github</th>\n<th>link</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>213TUBO</td>\n<td>notebook</td>\n<td><a href=\"https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724\" target=\"_blank\">https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724</a></td>\n</tr>\n<tr>\n<td>213TUBO</td>\n<td>github</td>\n<td><a href=\"https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states\" target=\"_blank\">https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states</a></td>\n</tr>\n</tbody>\n</table>\n<p>Thank you for reading.</p>",
      "rawMarkdown": "I would like to express gratitude to Kaggle for hosting the competition and Child Mind Institute for providing a dataset. \n\nI'm so grateful to 213TUBO for sharing the public notebook https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724.\nI gained a lot of knowledge from github https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states.\n\n# Context\n•\tBusiness context: https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/overview\n•\tData context: https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/data\n\n# Overview of the approach\n\n##The models \n\nThe framework Torch, models UNet, and AutoModel were used.\n| Owner |  Github|\n| --- | --- |\n|  213TUBO| https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/tree/main/src/models |\n\n```python\nfrom src.models.detr2D import DETR2DCNN\nfrom src.models.spec1D import Spec1D\nfrom src.models.spec2Dcnn import Spec2DCNN\nfrom src.models.transformerautomodel import TransformerAutoModel\nfrom src.models.centernet import CenterNet\n```\n\n## Data preprocessing, feature engineering:\n|  Name |  Value |\n| --- | --- |\n| Score th | 0.02 |\n| Distance | 10 |\n\nAdd feature:\n | Field | Function  |\n |  --- | --- |\n | Anglez, enmo| diff |\n | Anglez, enmo|  mean, avg|\n | Hour | sin, cos|\n\n## Augmentations:\n| Type|  Name |  Value |\n| --- | --- | --- |\n| Mixup|prob| 0.0|\n | Mixup|alpha| 0.4|\n | Cutmix|prob| 0.0|\n|  Cutmix|alpha|0.4|\n\n\n## Validation Strategy\nUse a train_series_ids and a valid_series_ids.\nThe rate of downsample is 2.\n\n# Details of the submission\nhttps://www.kaggle.com/code/emmawilsonev/cmi-submit/edit/run/153313645\n|Private Score|Public Score|\n| --- | --- |\n|0.728|0.707|\n\n## Code samples model training:\n\n| Training/Configuration | Code |\n| --- | --- |\n| Training |https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/src/modelmodule.py|\n|Configuration  |  https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/conf/train.yaml#L41|\n\n\nConfiguration:\n\n| Parameter | Value |\n| --- | --- |\n| epochs| 50 |\n| gradient_clip_val| 1.0 |\n| lr|0.0005|\n\n## Code samples feature engineering:\n\n\n    num_frames = upsampled_num_frames // downsample_rate\n\n```python\n    for onset, wakeup in this_event_df[[\"onset\", \"wakeup\"]].to_numpy():\n        onset_pos = int((onset - start) / duration * num_frames)\n        onset_offset = (onset - start) / duration * num_frames - onset_pos\n        wakeup_pos = int((wakeup - start) / duration * num_frames)\n        wakeup_offset = (wakeup - start) / duration * num_frames - wakeup_pos\n\n        bbox_size = (min(wakeup_pos, num_frames) - max(onset_pos, 0)) / num_frames\n```\n\n\n## Code samples model inference:\n\n```python\n        feature_extractor = get_feature_extractor(\n            cfg.feature_extractor, feature_dim, num_timesteps\n        )\n        decoder = get_decoder(cfg.decoder, feature_extractor.height, n_classes, num_timesteps)\n        model = Spec2DCNN(\n            feature_extractor=feature_extractor,\n            decoder=decoder,\n            in_channels=feature_extractor.out_chans,\n            mixup_alpha=cfg.aug.mixup_alpha,\n            cutmix_alpha=cfg.aug.cutmix_alpha,\n            **cfg.model.params,\n        )\n```\n\n## What was impactful about the submission. \nGrait concept 213TUBO concerning sin and cos:\nhttps://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/prepare_data.py\n\n\n##What was tried and didn’t work.\nSkillet-learn gradient boosting.\n\n## Helpful notebooks:\n| Author| notebook/github | link|\n| --- | --- |--- |\n| 213TUBO | notebook | https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724 |\n| 213TUBO | github | https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states |\n\n\nThank you for reading.",
      "votes": 5
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2567628": "I would like to express gratitude to Kaggle for hosting the competition and Child Mind Institute for providing a dataset. \n\nI'm so grateful to 213TUBO for sharing the public notebook https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724.\nI gained a lot of knowledge from github https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states.\n\n# Context\n•\tBusiness context: https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/overview\n•\tData context: https://www.kaggle.com/competitions/child-mind-institute-detect-sleep-states/data\n\n# Overview of the approach\n\n##The models \n\nThe framework Torch, models UNet, and AutoModel were used.\n| Owner |  Github|\n| --- | --- |\n|  213TUBO| https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/tree/main/src/models |\n\n```python\nfrom src.models.detr2D import DETR2DCNN\nfrom src.models.spec1D import Spec1D\nfrom src.models.spec2Dcnn import Spec2DCNN\nfrom src.models.transformerautomodel import TransformerAutoModel\nfrom src.models.centernet import CenterNet\n```\n\n## Data preprocessing, feature engineering:\n|  Name |  Value |\n| --- | --- |\n| Score th | 0.02 |\n| Distance | 10 |\n\nAdd feature:\n | Field | Function  |\n |  --- | --- |\n | Anglez, enmo| diff |\n | Anglez, enmo|  mean, avg|\n | Hour | sin, cos|\n\n## Augmentations:\n| Type|  Name |  Value |\n| --- | --- | --- |\n| Mixup|prob| 0.0|\n | Mixup|alpha| 0.4|\n | Cutmix|prob| 0.0|\n|  Cutmix|alpha|0.4|\n\n\n## Validation Strategy\nUse a train_series_ids and a valid_series_ids.\nThe rate of downsample is 2.\n\n# Details of the submission\nhttps://www.kaggle.com/code/emmawilsonev/cmi-submit/edit/run/153313645\n|Private Score|Public Score|\n| --- | --- |\n|0.728|0.707|\n\n## Code samples model training:\n\n| Training/Configuration | Code |\n| --- | --- |\n| Training |https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/src/modelmodule.py|\n|Configuration  |  https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/conf/train.yaml#L41|\n\n\nConfiguration:\n\n| Parameter | Value |\n| --- | --- |\n| epochs| 50 |\n| gradient_clip_val| 1.0 |\n| lr|0.0005|\n\n## Code samples feature engineering:\n\n\n    num_frames = upsampled_num_frames // downsample_rate\n\n```python\n    for onset, wakeup in this_event_df[[\"onset\", \"wakeup\"]].to_numpy():\n        onset_pos = int((onset - start) / duration * num_frames)\n        onset_offset = (onset - start) / duration * num_frames - onset_pos\n        wakeup_pos = int((wakeup - start) / duration * num_frames)\n        wakeup_offset = (wakeup - start) / duration * num_frames - wakeup_pos\n\n        bbox_size = (min(wakeup_pos, num_frames) - max(onset_pos, 0)) / num_frames\n```\n\n\n## Code samples model inference:\n\n```python\n        feature_extractor = get_feature_extractor(\n            cfg.feature_extractor, feature_dim, num_timesteps\n        )\n        decoder = get_decoder(cfg.decoder, feature_extractor.height, n_classes, num_timesteps)\n        model = Spec2DCNN(\n            feature_extractor=feature_extractor,\n            decoder=decoder,\n            in_channels=feature_extractor.out_chans,\n            mixup_alpha=cfg.aug.mixup_alpha,\n            cutmix_alpha=cfg.aug.cutmix_alpha,\n            **cfg.model.params,\n        )\n```\n\n## What was impactful about the submission. \nGrait concept 213TUBO concerning sin and cos:\nhttps://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states/blob/main/run/prepare_data.py\n\n\n##What was tried and didn’t work.\nSkillet-learn gradient boosting.\n\n## Helpful notebooks:\n| Author| notebook/github | link|\n| --- | --- |--- |\n| 213TUBO | notebook | https://www.kaggle.com/code/tubotubo/cmi-submit?scriptVersionId=149255724 |\n| 213TUBO | github | https://github.com/tubo213/kaggle-child-mind-institute-detect-sleep-states |\n\n\nThank you for reading."
  },
  "complete": true,
  "source": "existing_discussion",
  "competition_id": 53666,
  "competition_slug": "child-mind-institute-detect-sleep-states",
  "team_id": 10930271,
  "solution_url": "/competitions/child-mind-institute-detect-sleep-states/writeups/emma-wilson-ev-685th-place-solution-for-the-child-"
}