{
  "id": 542441,
  "title": "Simple Baseline - Blood Glucose at -0:00",
  "url": "/competitions/brist1d/discussion/542441",
  "author_name": "",
  "post_date": "2024-10-24T21:27:28.242053500Z",
  "votes": 14,
  "comment_count": 4,
  "views": 0,
  "content": "<p>An interesting tidbit of information - want to beat the sample submission in 3 lines of code? If you take a quick look at kernel density estimates for <code>bg-0:00</code> and <code>bg+1:00</code>, you see some interesting similarities:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2F041eefe3201b57da4aea75c6ccdca150%2Fblood_glucose_000_100.png?generation=1729804497164765&amp;alt=media\" alt=\"\"></p>\n<p>While there are some differences, their density estimates are very very similar. Taking a quick look at basic properties of the columns reveals the following:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2Ffb821c7a01e89bf84bce506d5f614f25%2Fproperties_bg_000_100.png?generation=1729804586613123&amp;alt=media\" alt=\"\"></p>\n<p>As we can see, min, max, mean, and standard deviations are very very similar. So, taking a simple approach, let's just use <code>bg-0:00</code> as the prediction for <code>bg+1:00</code>. Since we know the data has a lot of missing values, we can fall back to using <code>bg-0:05</code> or <code>bg-0:10</code> if one of those are missing. If all three are missing, we can just use the mean value of <code>bg-0:00</code> as our guess. Doing so reveals a surprising result for the training set:</p>\n<p>$$RMSE = 2.3277874025246774$$</p>\n<p>Generating a <a href=\"https://www.kaggle.com/code/craigmthomas/brist1d-simple-prediction/notebook\" target=\"_blank\">simple solution using this approach</a> for the test set yields a public LB score of 2.9156 - which is better than the sample submission (i.e. the same value for each patient). It is worse than the current first place public notebook of 2.4738, but still - it's a simple baseline for performance comparison purposes. Anyhow, the \"so what\" of this post is that <code>bg-0:00</code> is a very strong predictor for <code>bg+1:00</code> with no machine learning or domain knowledge. </p>",
  "messages": [
    {
      "id": "3027470",
      "postDate": "10/24/2024 21:27:28",
      "content": "<p>An interesting tidbit of information - want to beat the sample submission in 3 lines of code? If you take a quick look at kernel density estimates for <code>bg-0:00</code> and <code>bg+1:00</code>, you see some interesting similarities:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2F041eefe3201b57da4aea75c6ccdca150%2Fblood_glucose_000_100.png?generation=1729804497164765&amp;alt=media\" alt=\"\"></p>\n<p>While there are some differences, their density estimates are very very similar. Taking a quick look at basic properties of the columns reveals the following:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2Ffb821c7a01e89bf84bce506d5f614f25%2Fproperties_bg_000_100.png?generation=1729804586613123&amp;alt=media\" alt=\"\"></p>\n<p>As we can see, min, max, mean, and standard deviations are very very similar. So, taking a simple approach, let's just use <code>bg-0:00</code> as the prediction for <code>bg+1:00</code>. Since we know the data has a lot of missing values, we can fall back to using <code>bg-0:05</code> or <code>bg-0:10</code> if one of those are missing. If all three are missing, we can just use the mean value of <code>bg-0:00</code> as our guess. Doing so reveals a surprising result for the training set:</p>\n<p>$$RMSE = 2.3277874025246774$$</p>\n<p>Generating a <a href=\"https://www.kaggle.com/code/craigmthomas/brist1d-simple-prediction/notebook\" target=\"_blank\">simple solution using this approach</a> for the test set yields a public LB score of 2.9156 - which is better than the sample submission (i.e. the same value for each patient). It is worse than the current first place public notebook of 2.4738, but still - it's a simple baseline for performance comparison purposes. Anyhow, the \"so what\" of this post is that <code>bg-0:00</code> is a very strong predictor for <code>bg+1:00</code> with no machine learning or domain knowledge. </p>",
      "rawMarkdown": "An interesting tidbit of information - want to beat the sample submission in 3 lines of code? If you take a quick look at kernel density estimates for `bg-0:00` and `bg+1:00`, you see some interesting similarities:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2F041eefe3201b57da4aea75c6ccdca150%2Fblood_glucose_000_100.png?generation=1729804497164765&alt=media)\n\nWhile there are some differences, their density estimates are very very similar. Taking a quick look at basic properties of the columns reveals the following:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2Ffb821c7a01e89bf84bce506d5f614f25%2Fproperties_bg_000_100.png?generation=1729804586613123&alt=media)\n\nAs we can see, min, max, mean, and standard deviations are very very similar. So, taking a simple approach, let's just use `bg-0:00` as the prediction for `bg+1:00`. Since we know the data has a lot of missing values, we can fall back to using `bg-0:05` or `bg-0:10` if one of those are missing. If all three are missing, we can just use the mean value of `bg-0:00` as our guess. Doing so reveals a surprising result for the training set:\n\n$$RMSE = 2.3277874025246774$$\n\nGenerating a [simple solution using this approach](https://www.kaggle.com/code/craigmthomas/brist1d-simple-prediction/notebook) for the test set yields a public LB score of 2.9156 - which is better than the sample submission (i.e. the same value for each patient). It is worse than the current first place public notebook of 2.4738, but still - it's a simple baseline for performance comparison purposes. Anyhow, the \"so what\" of this post is that `bg-0:00` is a very strong predictor for `bg+1:00` with no machine learning or domain knowledge.",
      "votes": null
    },
    {
      "id": "3027854",
      "postDate": "10/25/2024 11:08:09",
      "content": "<p>Thumbs up for doing the analysis and sharing it <a href=\"https://www.kaggle.com/craigmthomas\" target=\"_blank\">@craigmthomas</a>. Just mentioning that the reason that the distributions are almost identical is that the same values (literally the same values, except the ends of the series) are included: the train dataset consists of 6 hour windows shifted by 15 minutes. The histograms probably look so different just because of approximate binning.</p>",
      "rawMarkdown": "Thumbs up for doing the analysis and sharing it @craigmthomas. Just mentioning that the reason that the distributions are almost identical is that the same values (literally the same values, except the ends of the series) are included: the train dataset consists of 6 hour windows shifted by 15 minutes. The histograms probably look so different just because of approximate binning.",
      "votes": null
    },
    {
      "id": "3028243",
      "postDate": "10/25/2024 18:38:38",
      "content": "<p><a href=\"https://www.kaggle.com/jagofc\" target=\"_blank\">@jagofc</a> ha, thank you for this. I hadn't looked at the time windows yet (or the ID fields as part of my EDA) - I'm late to this competition - so I hadn't yet clicked into this. It helps explain some of the repeating patterns that I saw when I was looking at correlation between features. This is especially prominent when you look at correlation between <code>carbs-</code> features:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2F8aa13d3c37866ed5ef0c5defed65dd74%2Fblood_glucose_carbs_repeat.png?generation=1729859181525742&amp;alt=media\" alt=\"\"></p>\n<p>The repeating patterns on the correlation threw me, but now it makes sense - if there is a shift by 15 minute increments of the same values, then there is going to be correlation among the various time related features. </p>",
      "rawMarkdown": "jagofc ha, thank you for this. I hadn't looked at the time windows yet (or the ID fields as part of my EDA) - I'm late to this competition - so I hadn't yet clicked into this. It helps explain some of the repeating patterns that I saw when I was looking at correlation between features. This is especially prominent when you look at correlation between `carbs-` features:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2F8aa13d3c37866ed5ef0c5defed65dd74%2Fblood_glucose_carbs_repeat.png?generation=1729859181525742&alt=media)\n\nThe repeating patterns on the correlation threw me, but now it makes sense - if there is a shift by 15 minute increments of the same values, then there is going to be correlation among the various time related features.",
      "votes": null
    },
    {
      "id": "3033524",
      "postDate": "11/01/2024 08:41:47",
      "content": "<p>thanks a lot for sharing</p>",
      "rawMarkdown": "thanks a lot for sharing",
      "votes": null
    },
    {
      "id": "3037188",
      "postDate": "11/05/2024 13:10:26",
      "content": "<p>This was a great help as a starting point. Thanks!</p>",
      "rawMarkdown": "This was a great help as a starting point. Thanks!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3027854,
      "author_name": "jagofc",
      "author_url": "",
      "post_date": "10/25/2024 11:08:09",
      "content": "<p>Thumbs up for doing the analysis and sharing it <a href=\"https://www.kaggle.com/craigmthomas\" target=\"_blank\">@craigmthomas</a>. Just mentioning that the reason that the distributions are almost identical is that the same values (literally the same values, except the ends of the series) are included: the train dataset consists of 6 hour windows shifted by 15 minutes. The histograms probably look so different just because of approximate binning.</p>",
      "votes": null,
      "replies": [
        {
          "id": 3028243,
          "author_name": "craigmthomas",
          "author_url": "",
          "post_date": "10/25/2024 18:38:38",
          "content": "<p><a href=\"https://www.kaggle.com/jagofc\" target=\"_blank\">@jagofc</a> ha, thank you for this. I hadn't looked at the time windows yet (or the ID fields as part of my EDA) - I'm late to this competition - so I hadn't yet clicked into this. It helps explain some of the repeating patterns that I saw when I was looking at correlation between features. This is especially prominent when you look at correlation between <code>carbs-</code> features:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2F8aa13d3c37866ed5ef0c5defed65dd74%2Fblood_glucose_carbs_repeat.png?generation=1729859181525742&amp;alt=media\" alt=\"\"></p>\n<p>The repeating patterns on the correlation threw me, but now it makes sense - if there is a shift by 15 minute increments of the same values, then there is going to be correlation among the various time related features. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 3033524,
      "author_name": "mhhegazy",
      "author_url": "",
      "post_date": "11/01/2024 08:41:47",
      "content": "<p>thanks a lot for sharing</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3037188,
      "author_name": "jakebrannigan",
      "author_url": "",
      "post_date": "11/05/2024 13:10:26",
      "content": "<p>This was a great help as a starting point. Thanks!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3027470": "An interesting tidbit of information - want to beat the sample submission in 3 lines of code? If you take a quick look at kernel density estimates for `bg-0:00` and `bg+1:00`, you see some interesting similarities:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2F041eefe3201b57da4aea75c6ccdca150%2Fblood_glucose_000_100.png?generation=1729804497164765&alt=media)\n\nWhile there are some differences, their density estimates are very very similar. Taking a quick look at basic properties of the columns reveals the following:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2Ffb821c7a01e89bf84bce506d5f614f25%2Fproperties_bg_000_100.png?generation=1729804586613123&alt=media)\n\nAs we can see, min, max, mean, and standard deviations are very very similar. So, taking a simple approach, let's just use `bg-0:00` as the prediction for `bg+1:00`. Since we know the data has a lot of missing values, we can fall back to using `bg-0:05` or `bg-0:10` if one of those are missing. If all three are missing, we can just use the mean value of `bg-0:00` as our guess. Doing so reveals a surprising result for the training set:\n\n$$RMSE = 2.3277874025246774$$\n\nGenerating a [simple solution using this approach](https://www.kaggle.com/code/craigmthomas/brist1d-simple-prediction/notebook) for the test set yields a public LB score of 2.9156 - which is better than the sample submission (i.e. the same value for each patient). It is worse than the current first place public notebook of 2.4738, but still - it's a simple baseline for performance comparison purposes. Anyhow, the \"so what\" of this post is that `bg-0:00` is a very strong predictor for `bg+1:00` with no machine learning or domain knowledge.",
    "3027854": "Thumbs up for doing the analysis and sharing it @craigmthomas. Just mentioning that the reason that the distributions are almost identical is that the same values (literally the same values, except the ends of the series) are included: the train dataset consists of 6 hour windows shifted by 15 minutes. The histograms probably look so different just because of approximate binning.",
    "3028243": "jagofc ha, thank you for this. I hadn't looked at the time windows yet (or the ID fields as part of my EDA) - I'm late to this competition - so I hadn't yet clicked into this. It helps explain some of the repeating patterns that I saw when I was looking at correlation between features. This is especially prominent when you look at correlation between `carbs-` features:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2F8aa13d3c37866ed5ef0c5defed65dd74%2Fblood_glucose_carbs_repeat.png?generation=1729859181525742&alt=media)\n\nThe repeating patterns on the correlation threw me, but now it makes sense - if there is a shift by 15 minute increments of the same values, then there is going to be correlation among the various time related features.",
    "3033524": "thanks a lot for sharing",
    "3037188": "This was a great help as a starting point. Thanks!"
  },
  "source": "meta"
}