{
  "id": 13941,
  "title": "Does each image need to be classified independently or can one consider both left and right images when making a classification?",
  "url": "/competitions/diabetic-retinopathy-detection/discussion/13941",
  "author_name": "",
  "post_date": "2015-05-02T19:57:13.757Z",
  "votes": null,
  "comment_count": 4,
  "views": 1347,
  "content": "<p>Hello, i would like to know&nbsp;Does each image need to be classified independently or can one consider both left and right images when making a classification? could an admin clarify this please?</p>",
  "messages": [
    {
      "id": "76141",
      "postDate": "05/02/2015 19:57:13",
      "content": "<p>Hello, i would like to know&nbsp;Does each image need to be classified independently or can one consider both left and right images when making a classification? could an admin clarify this please?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "76573",
      "postDate": "05/04/2015 13:22:39",
      "content": "<p>You can consider both.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "76589",
      "postDate": "05/04/2015 14:10:48",
      "content": "<p>Just a quick word of caution on that, though: Make sure your algorithm is robust to still just using a single image. Unless I'm mistaken or mis-remembering,&nbsp;not every image in the provided data has&nbsp;an image for its corresponding contralateral eye included!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "76689",
      "postDate": "05/04/2015 20:46:58",
      "content": "<p>thanks for this clarification.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "76980",
      "postDate": "05/05/2015 09:56:53",
      "content": "<p>[quote=LAD;76589]</p>\n<p>Just a quick word of caution on that, though: Make sure your algorithm is robust to still just using a single image. Unless I'm mistaken or mis-remembering,&nbsp;not every image in the provided data has&nbsp;an image for its corresponding contralateral eye included!</p>\n<p>[/quote]</p>\n<p>You are mistaken. Both left and right are included.</p>\n<p>import pandas as pd</p>\n<p>def ensure_left_right(df):<br> # Extract all possible ids in the df<br> ids = set([v[0] for v in df.image.str.split('_', 1)])<br> imgs = []<br> for id in ids:<br> # For each id, create the left and right image<br> imgs.append('{}_left'.format(id))<br> imgs.append('{}_right'.format(id))<br> return sorted(imgs) == sorted(df.image)</p>\n<p>print ensure_left_right(pd.read_csv('trainLabels.csv')) # =&gt; True<br>print ensure_left_right(pd.read_csv('sampleSubmission.csv')) # =&gt; True</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 76573,
      "author_name": "wcukierski",
      "author_url": "",
      "post_date": "05/04/2015 13:22:39",
      "content": "<p>You can consider both.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 76589,
      "author_name": "lad215562",
      "author_url": "",
      "post_date": "05/04/2015 14:10:48",
      "content": "<p>Just a quick word of caution on that, though: Make sure your algorithm is robust to still just using a single image. Unless I'm mistaken or mis-remembering,&nbsp;not every image in the provided data has&nbsp;an image for its corresponding contralateral eye included!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 76689,
      "author_name": "siddjain",
      "author_url": "",
      "post_date": "05/04/2015 20:46:58",
      "content": "<p>thanks for this clarification.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 76980,
      "author_name": "jkalmeij",
      "author_url": "",
      "post_date": "05/05/2015 09:56:53",
      "content": "<p>[quote=LAD;76589]</p>\n<p>Just a quick word of caution on that, though: Make sure your algorithm is robust to still just using a single image. Unless I'm mistaken or mis-remembering,&nbsp;not every image in the provided data has&nbsp;an image for its corresponding contralateral eye included!</p>\n<p>[/quote]</p>\n<p>You are mistaken. Both left and right are included.</p>\n<p>import pandas as pd</p>\n<p>def ensure_left_right(df):<br> # Extract all possible ids in the df<br> ids = set([v[0] for v in df.image.str.split('_', 1)])<br> imgs = []<br> for id in ids:<br> # For each id, create the left and right image<br> imgs.append('{}_left'.format(id))<br> imgs.append('{}_right'.format(id))<br> return sorted(imgs) == sorted(df.image)</p>\n<p>print ensure_left_right(pd.read_csv('trainLabels.csv')) # =&gt; True<br>print ensure_left_right(pd.read_csv('sampleSubmission.csv')) # =&gt; True</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "76141": "",
    "76573": "",
    "76589": "",
    "76689": "",
    "76980": ""
  },
  "source": "meta"
}