{
  "id": 438517,
  "title": "A new approach to the problem?: Using two anomaly detection models",
  "url": "/competitions/child-mind-institute-detect-sleep-states/discussion/438517",
  "author_name": "EvanNie006",
  "post_date": "2023-09-11T14:47:25.336000",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Due to the low dimensionality of this data, it prompted me to come up with a quite different approach:</p>\n<ul>\n<li>Using 2 anomaly detection models (those that have temporal awareness e.g. LSTM-based ones)</li>\n<li>Each trained on samples of mainly 1 class (onset or wakeup)</li>\n<li>Unseen data is fed into both models:<br>\n               - If one model outputs a probability that data is an anomaly over a threshold (to be tuned) <br>\n                 while the other model outputs a probability that the data is normal over a threshold (to be tuned)<br>\n               - Classify the sample as the class that the model that thinks it is normal is trained on</li>\n</ul>\n<p>Would this actually be a worthwhile approach to experiment with? just sharing some of my random ideas :)</p>",
  "messages": [
    {
      "id": 2433386,
      "postDate": "2023-09-11T14:47:25.337Z",
      "content": "<p>Due to the low dimensionality of this data, it prompted me to come up with a quite different approach:</p>\n<ul>\n<li>Using 2 anomaly detection models (those that have temporal awareness e.g. LSTM-based ones)</li>\n<li>Each trained on samples of mainly 1 class (onset or wakeup)</li>\n<li>Unseen data is fed into both models:<br>\n               - If one model outputs a probability that data is an anomaly over a threshold (to be tuned) <br>\n                 while the other model outputs a probability that the data is normal over a threshold (to be tuned)<br>\n               - Classify the sample as the class that the model that thinks it is normal is trained on</li>\n</ul>\n<p>Would this actually be a worthwhile approach to experiment with? just sharing some of my random ideas :)</p>",
      "rawMarkdown": "Due to the low dimensionality of this data, it prompted me to come up with a quite different approach:\n- Using 2 anomaly detection models (those that have temporal awareness e.g. LSTM-based ones)\n- Each trained on samples of mainly 1 class (onset or wakeup)\n- Unseen data is fed into both models:\n                   - If one model outputs a probability that data is an anomaly over a threshold (to be tuned) \n                     while the other model outputs a probability that the data is normal over a threshold (to be tuned)\n                   - Classify the sample as the class that the model that thinks it is normal is trained on\n\nWould this actually be a worthwhile approach to experiment with? just sharing some of my random ideas :)",
      "votes": 2
    },
    {
      "id": 2436937,
      "postDate": "2023-09-13T21:45:34.540Z",
      "content": "<p>It does seem like separately detecting a starting-sleep event (active, then reduced activity) and a waking-up event (little activity, then active) could be useful. They are unlikely to just be time reversals of each other, for example. Some methods may have no trouble learning the two event types, others might work better implementing two models with each one focusing on a single event type.  I think it's a good thought, thanks ✨</p>",
      "rawMarkdown": "It does seem like separately detecting a starting-sleep event (active, then reduced activity) and a waking-up event (little activity, then active) could be useful. They are unlikely to just be time reversals of each other, for example. Some methods may have no trouble learning the two event types, others might work better implementing two models with each one focusing on a single event type.  I think it's a good thought, thanks ✨"
    },
    {
      "id": 2433598,
      "postDate": "2023-09-11T17:12:50.050Z",
      "content": "<p>Not fully sure about the anomaly detection approach since the timeseries has periods of sleep and periods of awake (both in a way are expected behaviour) and not one off events where the data points are significantly different in comparison to the expected behaviour.</p>\n<p>Thank you for sharing. It's good to have a bunch of approaches to solve this problem.</p>",
      "rawMarkdown": "Not fully sure about the anomaly detection approach since the timeseries has periods of sleep and periods of awake (both in a way are expected behaviour) and not one off events where the data points are significantly different in comparison to the expected behaviour.\n\nThank you for sharing. It's good to have a bunch of approaches to solve this problem.",
      "votes": 1,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2436937,
      "author_name": "Daniel Dewey",
      "author_url": "",
      "post_date": "2023-09-13T21:45:34.540000",
      "content": "<p>It does seem like separately detecting a starting-sleep event (active, then reduced activity) and a waking-up event (little activity, then active) could be useful. They are unlikely to just be time reversals of each other, for example. Some methods may have no trouble learning the two event types, others might work better implementing two models with each one focusing on a single event type.  I think it's a good thought, thanks ✨</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2433598,
      "author_name": "Bhargav Kowshik",
      "author_url": "",
      "post_date": "2023-09-11T17:12:50.050000",
      "content": "<p>Not fully sure about the anomaly detection approach since the timeseries has periods of sleep and periods of awake (both in a way are expected behaviour) and not one off events where the data points are significantly different in comparison to the expected behaviour.</p>\n<p>Thank you for sharing. It's good to have a bunch of approaches to solve this problem.</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2433386": "Due to the low dimensionality of this data, it prompted me to come up with a quite different approach:\n- Using 2 anomaly detection models (those that have temporal awareness e.g. LSTM-based ones)\n- Each trained on samples of mainly 1 class (onset or wakeup)\n- Unseen data is fed into both models:\n                   - If one model outputs a probability that data is an anomaly over a threshold (to be tuned) \n                     while the other model outputs a probability that the data is normal over a threshold (to be tuned)\n                   - Classify the sample as the class that the model that thinks it is normal is trained on\n\nWould this actually be a worthwhile approach to experiment with? just sharing some of my random ideas :)",
    "2436937": "It does seem like separately detecting a starting-sleep event (active, then reduced activity) and a waking-up event (little activity, then active) could be useful. They are unlikely to just be time reversals of each other, for example. Some methods may have no trouble learning the two event types, others might work better implementing two models with each one focusing on a single event type.  I think it's a good thought, thanks ✨",
    "2433598": "Not fully sure about the anomaly detection approach since the timeseries has periods of sleep and periods of awake (both in a way are expected behaviour) and not one off events where the data points are significantly different in comparison to the expected behaviour.\n\nThank you for sharing. It's good to have a bunch of approaches to solve this problem."
  }
}