{
  "id": 26691,
  "title": "Jaccard Index",
  "url": "/competitions/dstl-satellite-imagery-feature-detection/discussion/26691",
  "author_name": "",
  "post_date": "2016-12-20T02:07:09.667Z",
  "votes": 3,
  "comment_count": 2,
  "views": 375,
  "content": "<p>I've seen various implementation of Jaccard similarity coefficient calculations on Github e.a. </p>\n\n<p>Any suggestions what to use to evaluate your models prior to uploading?</p>",
  "messages": [
    {
      "id": "151304",
      "postDate": "12/20/2016 02:07:09",
      "content": "<p>I've seen various implementation of Jaccard similarity coefficient calculations on Github e.a. </p>\n\n<p>Any suggestions what to use to evaluate your models prior to uploading?</p>",
      "rawMarkdown": "I've seen various implementation of Jaccard similarity coefficient calculations on Github e.a. \r\n\r\nAny suggestions what to use to evaluate your models prior to uploading?",
      "votes": null
    },
    {
      "id": "152173",
      "postDate": "12/23/2016 19:48:31",
      "content": "<p>It would be nice to know.  I think I'll use the sklearn version for my testing.</p>",
      "rawMarkdown": "It would be nice to know.  I think I'll use the sklearn version for my testing.",
      "votes": null
    },
    {
      "id": "152176",
      "postDate": "12/23/2016 19:58:13",
      "content": "<p>It can be done with shapely. If  you have a prediction and an actual multipolygon object for an image:</p>\n\n<pre><code>tp = prediction_polygon.intersection(actual_polygon).area\nfp = prediction_polygon.area - tp\nfn = actual_polygon.area - tp\n\njaccard = tp / (tp + fp + fn)\n</code></pre>",
      "rawMarkdown": "It can be done with shapely. If  you have a prediction and an actual multipolygon object for an image:\r\n\r\n    tp = prediction_polygon.intersection(actual_polygon).area\r\n    fp = prediction_polygon.area - tp\r\n    fn = actual_polygon.area - tp\r\n    \r\n    jaccard = tp / (tp + fp + fn)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 152173,
      "author_name": "zerozero",
      "author_url": "",
      "post_date": "12/23/2016 19:48:31",
      "content": "<p>It would be nice to know.  I think I'll use the sklearn version for my testing.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 152176,
      "author_name": "shawn775",
      "author_url": "",
      "post_date": "12/23/2016 19:58:13",
      "content": "<p>It can be done with shapely. If  you have a prediction and an actual multipolygon object for an image:</p>\n\n<pre><code>tp = prediction_polygon.intersection(actual_polygon).area\nfp = prediction_polygon.area - tp\nfn = actual_polygon.area - tp\n\njaccard = tp / (tp + fp + fn)\n</code></pre>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "151304": "I've seen various implementation of Jaccard similarity coefficient calculations on Github e.a. \r\n\r\nAny suggestions what to use to evaluate your models prior to uploading?",
    "152173": "It would be nice to know.  I think I'll use the sklearn version for my testing.",
    "152176": "It can be done with shapely. If  you have a prediction and an actual multipolygon object for an image:\r\n\r\n    tp = prediction_polygon.intersection(actual_polygon).area\r\n    fp = prediction_polygon.area - tp\r\n    fn = actual_polygon.area - tp\r\n    \r\n    jaccard = tp / (tp + fp + fn)"
  },
  "source": "meta"
}