{
  "id": 65648,
  "title": "Mean Avaerge Precision per batch",
  "url": "/competitions/rsna-pneumonia-detection-challenge/discussion/65648",
  "author_name": "",
  "post_date": "2018-09-13T08:28:28.736415Z",
  "votes": null,
  "comment_count": 3,
  "views": 0,
  "content": "<p>That's another one question about competition metric. I want to implement some metric MAP_metric(y_pred, y_true) and then compile my model this way:</p>\n\n<pre><code>model.compile(optimizer=..., loss=..., metrics=['MAP_metric])\n</code></pre>\n\n<p>Let's say, I have N examples in my validation_set, and in M of that I have pictures without phneumonia and without bounding boxes. The problem is, that I need to summarize MAP_metric() for all examples of my validation set, and then devide this sum. Bat denominator have to be N - M instead of N, that I get by my implementation. Does anybody solve this problem? That's important, cause I want to get equivalence with validation and LB scores.</p>",
  "messages": [
    {
      "id": "386616",
      "postDate": "09/13/2018 08:28:28",
      "content": "<p>That's another one question about competition metric. I want to implement some metric MAP_metric(y_pred, y_true) and then compile my model this way:</p>\n\n<pre><code>model.compile(optimizer=..., loss=..., metrics=['MAP_metric])\n</code></pre>\n\n<p>Let's say, I have N examples in my validation_set, and in M of that I have pictures without phneumonia and without bounding boxes. The problem is, that I need to summarize MAP_metric() for all examples of my validation set, and then devide this sum. Bat denominator have to be N - M instead of N, that I get by my implementation. Does anybody solve this problem? That's important, cause I want to get equivalence with validation and LB scores.</p>",
      "rawMarkdown": "That's another one question about competition metric. I want to implement some metric MAP_metric(y_pred, y_true) and then compile my model this way:\n\n    model.compile(optimizer=..., loss=..., metrics=['MAP_metric])\n\nLet's say, I have N examples in my validation_set, and in M of that I have pictures without phneumonia and without bounding boxes. The problem is, that I need to summarize MAP_metric() for all examples of my validation set, and then devide this sum. Bat denominator have to be N - M instead of N, that I get by my implementation. Does anybody solve this problem? That's important, cause I want to get equivalence with validation and LB scores.",
      "votes": null
    },
    {
      "id": "387327",
      "postDate": "09/14/2018 18:53:50",
      "content": "<p>Have you tried what's been done here: <a href=\"https://www.kaggle.com/vbookshelf/keras-iou-metric-implemented-without-tensor-drama\">https://www.kaggle.com/vbookshelf/keras-iou-metric-implemented-without-tensor-drama</a>  ?</p>",
      "rawMarkdown": "Have you tried what's been done here: https://www.kaggle.com/vbookshelf/keras-iou-metric-implemented-without-tensor-drama  ?",
      "votes": null
    },
    {
      "id": "388507",
      "postDate": "09/17/2018 05:37:50",
      "content": "<p>Oh, no. I mean Mean Average Precision metric. Link that you give consist just IOU implementation.</p>",
      "rawMarkdown": "Oh, no. I mean Mean Average Precision metric. Link that you give consist just IOU implementation.",
      "votes": null
    },
    {
      "id": "388887",
      "postDate": "09/17/2018 19:11:27",
      "content": "<p>In this case - <a href=\"https://www.kaggle.com/chenyc15/mean-average-precision-metric\">https://www.kaggle.com/chenyc15/mean-average-precision-metric</a>  hope it could help. I have adapted the same way and hope it is the official metric. </p>\n\n<p>There is this discussion <a href=\"https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64860\">https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64860</a> where we would like to get the official implementation </p>",
      "rawMarkdown": "In this case - https://www.kaggle.com/chenyc15/mean-average-precision-metric  hope it could help. I have adapted the same way and hope it is the official metric. \n\nThere is this discussion https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64860 where we would like to get the official implementation",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 387327,
      "author_name": "kretes",
      "author_url": "",
      "post_date": "09/14/2018 18:53:50",
      "content": "<p>Have you tried what's been done here: <a href=\"https://www.kaggle.com/vbookshelf/keras-iou-metric-implemented-without-tensor-drama\">https://www.kaggle.com/vbookshelf/keras-iou-metric-implemented-without-tensor-drama</a>  ?</p>",
      "votes": null,
      "replies": [
        {
          "id": 388507,
          "author_name": "koza4ukdmitrij",
          "author_url": "",
          "post_date": "09/17/2018 05:37:50",
          "content": "<p>Oh, no. I mean Mean Average Precision metric. Link that you give consist just IOU implementation.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 388887,
          "author_name": "kretes",
          "author_url": "",
          "post_date": "09/17/2018 19:11:27",
          "content": "<p>In this case - <a href=\"https://www.kaggle.com/chenyc15/mean-average-precision-metric\">https://www.kaggle.com/chenyc15/mean-average-precision-metric</a>  hope it could help. I have adapted the same way and hope it is the official metric. </p>\n\n<p>There is this discussion <a href=\"https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64860\">https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64860</a> where we would like to get the official implementation </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "386616": "That's another one question about competition metric. I want to implement some metric MAP_metric(y_pred, y_true) and then compile my model this way:\n\n    model.compile(optimizer=..., loss=..., metrics=['MAP_metric])\n\nLet's say, I have N examples in my validation_set, and in M of that I have pictures without phneumonia and without bounding boxes. The problem is, that I need to summarize MAP_metric() for all examples of my validation set, and then devide this sum. Bat denominator have to be N - M instead of N, that I get by my implementation. Does anybody solve this problem? That's important, cause I want to get equivalence with validation and LB scores.",
    "387327": "Have you tried what's been done here: https://www.kaggle.com/vbookshelf/keras-iou-metric-implemented-without-tensor-drama  ?",
    "388507": "Oh, no. I mean Mean Average Precision metric. Link that you give consist just IOU implementation.",
    "388887": "In this case - https://www.kaggle.com/chenyc15/mean-average-precision-metric  hope it could help. I have adapted the same way and hope it is the official metric. \n\nThere is this discussion https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64860 where we would like to get the official implementation"
  },
  "source": "meta"
}