{
  "id": 546266,
  "title": "Scatter Plot of SII vs Internet Hours per Day",
  "url": "/competitions/child-mind-institute-problematic-internet-use/discussion/546266",
  "author_name": "",
  "post_date": "2024-11-14T17:30:26.792817300Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p><img src=\"https://i.postimg.cc/prpr4vCF/sii-internet.png\" alt=\"\"></p>\n<p>Here we have a scatter plot for our target variable i.e SII and number of hours for which internet was used. This plot is interesting but also strange. It shows that we have all possible SII values for all possible internet usage hours per day. <strong>This makes it difficult to distinguish and understand that how the SII value changes with time of internet usage change.</strong></p>\n<p>Please share your view, if I am right that under such scenario it is difficult to distinguish and understand that how SII will be effect when time of internet usage per day starts to increase or decrease. Ideally based on the context of the competition, SII should increase whenever internet usage hours increases per day.</p>",
  "messages": [
    {
      "id": "3045688",
      "postDate": "11/14/2024 17:30:26",
      "content": "<p><img src=\"https://i.postimg.cc/prpr4vCF/sii-internet.png\" alt=\"\"></p>\n<p>Here we have a scatter plot for our target variable i.e SII and number of hours for which internet was used. This plot is interesting but also strange. It shows that we have all possible SII values for all possible internet usage hours per day. <strong>This makes it difficult to distinguish and understand that how the SII value changes with time of internet usage change.</strong></p>\n<p>Please share your view, if I am right that under such scenario it is difficult to distinguish and understand that how SII will be effect when time of internet usage per day starts to increase or decrease. Ideally based on the context of the competition, SII should increase whenever internet usage hours increases per day.</p>",
      "rawMarkdown": "![](https://i.postimg.cc/prpr4vCF/sii-internet.png)\n\nHere we have a scatter plot for our target variable i.e SII and number of hours for which internet was used. This plot is interesting but also strange. It shows that we have all possible SII values for all possible internet usage hours per day. **This makes it difficult to distinguish and understand that how the SII value changes with time of internet usage change.**\n\nPlease share your view, if I am right that under such scenario it is difficult to distinguish and understand that how SII will be effect when time of internet usage per day starts to increase or decrease. Ideally based on the context of the competition, SII should increase whenever internet usage hours increases per day.",
      "votes": null
    },
    {
      "id": "3045862",
      "postDate": "11/14/2024 21:28:52",
      "content": "<blockquote>\n  <p>Here we have a scatter plot for our target variable i.e SII and number of hours for which internet was used. This plot is interesting but also strange. It shows that we have all possible SII values for all possible internet usage hours per day. This makes it difficult to distinguish and understand that how the SII value changes with time of internet usage change.</p>\n</blockquote>\n<p>In this instance, using a scatterplot does not show the full picture. You will get a better analysis by including another dimension, the count of sii between each hour.  </p>\n<p><strong>Using Count</strong></p>\n<pre><code>tmp = dftr[[,]].value_counts().reset_index()\ntmp[[,]] = tmp[[,]].astype()\n\ntmp = tmp.pivot(\n    columns=,\n    index=,\n    values=\n).fillna()\n\n\nplt.figure(figsize=(, ))\nsns.heatmap(tmp, annot=, fmt=, cmap=, cbar=, linewidths=, linecolor=)\n\nplt.xlabel()\nplt.ylabel()\n\nplt.show()\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20661481%2F8cf0a14397edc78c9b3f30668ea04ad1%2FScreenshot%202024-11-15%20082530.png?generation=1731619628737611&amp;alt=media\" alt=\"\"></p>\n<p><strong>Using Proportions</strong></p>\n<pre><code>tmp = dftr[[,]].value_counts().reset_index()\ntmp[[,]] = tmp[[,]].astype()\n\ntmp = tmp.pivot(\n    columns=,\n    index=,\n    values=\n).fillna()\n\ntmp = tmp.div(tmp.().()).fillna() * \n\nplt.figure(figsize=(, ))\nsns.heatmap(tmp, annot=, fmt=, cmap=, cbar=, linewidths=, linecolor=)\n\nplt.xlabel()\nplt.ylabel()\n\nplt.show()\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20661481%2Fbdae9a24a10e29f999157b0ab3ee626e%2FScreenshot%202024-11-15%20082641.png?generation=1731619711400660&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": ">Here we have a scatter plot for our target variable i.e SII and number of hours for which internet was used. This plot is interesting but also strange. It shows that we have all possible SII values for all possible internet usage hours per day. This makes it difficult to distinguish and understand that how the SII value changes with time of internet usage change.\n\nIn this instance, using a scatterplot does not show the full picture. You will get a better analysis by including another dimension, the count of sii between each hour.  \n\n**Using Count**\n\n```python\ntmp = dftr[['sii','PreInt_EduHx-computerinternet_hoursday']].value_counts().reset_index()\ntmp[['sii','PreInt_EduHx-computerinternet_hoursday']] = tmp[['sii','PreInt_EduHx-computerinternet_hoursday']].astype(int)\n\ntmp = tmp.pivot(\n    columns=\"PreInt_EduHx-computerinternet_hoursday\",\n    index=\"sii\",\n    values=\"count\"\n).fillna(0)\n\n\nplt.figure(figsize=(8, 6))\nsns.heatmap(tmp, annot=True, fmt=\".0f\", cmap=\"Blues\", cbar=True, linewidths=0.01, linecolor='lightgray')\n\nplt.xlabel('SII')\nplt.ylabel('Computer/Internet Hours per Day')\n\nplt.show()\n```\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20661481%2F8cf0a14397edc78c9b3f30668ea04ad1%2FScreenshot%202024-11-15%20082530.png?generation=1731619628737611&alt=media)\n\n**Using Proportions**\n\n```python\ntmp = dftr[['sii','PreInt_EduHx-computerinternet_hoursday']].value_counts().reset_index()\ntmp[['sii','PreInt_EduHx-computerinternet_hoursday']] = tmp[['sii','PreInt_EduHx-computerinternet_hoursday']].astype(int)\n\ntmp = tmp.pivot(\n    columns=\"PreInt_EduHx-computerinternet_hoursday\",\n    index=\"sii\",\n    values=\"count\"\n).fillna(0)\n\ntmp = tmp.div(tmp.sum().sum()).fillna(0) * 100\n\nplt.figure(figsize=(8, 6))\nsns.heatmap(tmp, annot=True, fmt=\".1f\", cmap=\"Blues\", cbar=True, linewidths=0.1, linecolor='lightgray')\n\nplt.xlabel('SII')\nplt.ylabel('Computer/Internet Hours per Day')\n\nplt.show()\n```\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20661481%2Fbdae9a24a10e29f999157b0ab3ee626e%2FScreenshot%202024-11-15%20082641.png?generation=1731619711400660&alt=media)",
      "votes": null
    },
    {
      "id": "3046283",
      "postDate": "11/15/2024 10:12:04",
      "content": "<p>Yes it makes more sense to include the count. Thank you</p>",
      "rawMarkdown": "Yes it makes more sense to include the count. Thank you",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3045862,
      "author_name": "bsmelbs",
      "author_url": "",
      "post_date": "11/14/2024 21:28:52",
      "content": "<blockquote>\n  <p>Here we have a scatter plot for our target variable i.e SII and number of hours for which internet was used. This plot is interesting but also strange. It shows that we have all possible SII values for all possible internet usage hours per day. This makes it difficult to distinguish and understand that how the SII value changes with time of internet usage change.</p>\n</blockquote>\n<p>In this instance, using a scatterplot does not show the full picture. You will get a better analysis by including another dimension, the count of sii between each hour.  </p>\n<p><strong>Using Count</strong></p>\n<pre><code>tmp = dftr[[,]].value_counts().reset_index()\ntmp[[,]] = tmp[[,]].astype()\n\ntmp = tmp.pivot(\n    columns=,\n    index=,\n    values=\n).fillna()\n\n\nplt.figure(figsize=(, ))\nsns.heatmap(tmp, annot=, fmt=, cmap=, cbar=, linewidths=, linecolor=)\n\nplt.xlabel()\nplt.ylabel()\n\nplt.show()\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20661481%2F8cf0a14397edc78c9b3f30668ea04ad1%2FScreenshot%202024-11-15%20082530.png?generation=1731619628737611&amp;alt=media\" alt=\"\"></p>\n<p><strong>Using Proportions</strong></p>\n<pre><code>tmp = dftr[[,]].value_counts().reset_index()\ntmp[[,]] = tmp[[,]].astype()\n\ntmp = tmp.pivot(\n    columns=,\n    index=,\n    values=\n).fillna()\n\ntmp = tmp.div(tmp.().()).fillna() * \n\nplt.figure(figsize=(, ))\nsns.heatmap(tmp, annot=, fmt=, cmap=, cbar=, linewidths=, linecolor=)\n\nplt.xlabel()\nplt.ylabel()\n\nplt.show()\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20661481%2Fbdae9a24a10e29f999157b0ab3ee626e%2FScreenshot%202024-11-15%20082641.png?generation=1731619711400660&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 3046283,
          "author_name": "taimour",
          "author_url": "",
          "post_date": "11/15/2024 10:12:04",
          "content": "<p>Yes it makes more sense to include the count. Thank you</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3045688": "![](https://i.postimg.cc/prpr4vCF/sii-internet.png)\n\nHere we have a scatter plot for our target variable i.e SII and number of hours for which internet was used. This plot is interesting but also strange. It shows that we have all possible SII values for all possible internet usage hours per day. **This makes it difficult to distinguish and understand that how the SII value changes with time of internet usage change.**\n\nPlease share your view, if I am right that under such scenario it is difficult to distinguish and understand that how SII will be effect when time of internet usage per day starts to increase or decrease. Ideally based on the context of the competition, SII should increase whenever internet usage hours increases per day.",
    "3045862": ">Here we have a scatter plot for our target variable i.e SII and number of hours for which internet was used. This plot is interesting but also strange. It shows that we have all possible SII values for all possible internet usage hours per day. This makes it difficult to distinguish and understand that how the SII value changes with time of internet usage change.\n\nIn this instance, using a scatterplot does not show the full picture. You will get a better analysis by including another dimension, the count of sii between each hour.  \n\n**Using Count**\n\n```python\ntmp = dftr[['sii','PreInt_EduHx-computerinternet_hoursday']].value_counts().reset_index()\ntmp[['sii','PreInt_EduHx-computerinternet_hoursday']] = tmp[['sii','PreInt_EduHx-computerinternet_hoursday']].astype(int)\n\ntmp = tmp.pivot(\n    columns=\"PreInt_EduHx-computerinternet_hoursday\",\n    index=\"sii\",\n    values=\"count\"\n).fillna(0)\n\n\nplt.figure(figsize=(8, 6))\nsns.heatmap(tmp, annot=True, fmt=\".0f\", cmap=\"Blues\", cbar=True, linewidths=0.01, linecolor='lightgray')\n\nplt.xlabel('SII')\nplt.ylabel('Computer/Internet Hours per Day')\n\nplt.show()\n```\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20661481%2F8cf0a14397edc78c9b3f30668ea04ad1%2FScreenshot%202024-11-15%20082530.png?generation=1731619628737611&alt=media)\n\n**Using Proportions**\n\n```python\ntmp = dftr[['sii','PreInt_EduHx-computerinternet_hoursday']].value_counts().reset_index()\ntmp[['sii','PreInt_EduHx-computerinternet_hoursday']] = tmp[['sii','PreInt_EduHx-computerinternet_hoursday']].astype(int)\n\ntmp = tmp.pivot(\n    columns=\"PreInt_EduHx-computerinternet_hoursday\",\n    index=\"sii\",\n    values=\"count\"\n).fillna(0)\n\ntmp = tmp.div(tmp.sum().sum()).fillna(0) * 100\n\nplt.figure(figsize=(8, 6))\nsns.heatmap(tmp, annot=True, fmt=\".1f\", cmap=\"Blues\", cbar=True, linewidths=0.1, linecolor='lightgray')\n\nplt.xlabel('SII')\nplt.ylabel('Computer/Internet Hours per Day')\n\nplt.show()\n```\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20661481%2Fbdae9a24a10e29f999157b0ab3ee626e%2FScreenshot%202024-11-15%20082641.png?generation=1731619711400660&alt=media)",
    "3046283": "Yes it makes more sense to include the count. Thank you"
  },
  "source": "meta"
}