{
  "id": 305997,
  "title": "[Blog] Mean Average Precision for Recommender Systems",
  "url": "/competitions/h-and-m-personalized-fashion-recommendations/discussion/305997",
  "author_name": "",
  "post_date": "2022-02-07T19:38:24.521465800Z",
  "votes": 26,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I found this <a href=\"https://sdsawtelle.github.io/blog/output/mean-average-precision-MAP-for-recommender-systems.html\" target=\"_blank\">Blog</a> to be a crispy read for understanding MAP in the Recsys world. </p>\n<p>Good Luck everyone!</p>",
  "messages": [
    {
      "id": "1680423",
      "postDate": "02/07/2022 19:38:24",
      "content": "<p>I found this <a href=\"https://sdsawtelle.github.io/blog/output/mean-average-precision-MAP-for-recommender-systems.html\" target=\"_blank\">Blog</a> to be a crispy read for understanding MAP in the Recsys world. </p>\n<p>Good Luck everyone!</p>",
      "rawMarkdown": "I found this [Blog](https://sdsawtelle.github.io/blog/output/mean-average-precision-MAP-for-recommender-systems.html) to be a crispy read for understanding MAP in the Recsys world. \n\nGood Luck everyone!",
      "votes": null
    },
    {
      "id": "1747088",
      "postDate": "04/06/2022 10:37:55",
      "content": "<p><a href=\"https://www.kaggle.com/init27\" target=\"_blank\">@init27</a> Nice reference. Let me see that i get this right.Let's say customer bought articles 1 4 6.</p>\n<ol>\n<li>I submit 1 W W W W (W be something wrong). P(5) is 1 .5 .33 .25 .2 . AP(5) = sum of all P(5)/5 .MAP@5 would be mean of all the customer MP. I think that this should be right .right?</li>\n</ol>",
      "rawMarkdown": "init27 Nice reference. Let me see that i get this right.Let's say customer bought articles 1 4 6.\n1. I submit 1 W W W W (W be something wrong). P(5) is 1 .5 .33 .25 .2 . AP(5) = sum of all P(5)/5 .MAP@5 would be mean of all the customer MP. I think that this should be right .right?",
      "votes": null
    },
    {
      "id": "1767104",
      "postDate": "04/25/2022 05:08:04",
      "content": "<p>Hi,<br>\nBased on your example we can do the following calculation:</p>\n<ol>\n<li>Customer bought articles 1, 4, 6 meaning m=3</li>\n<li>model prediction results are [1, 0, 0, 0, 0] therefore :</li>\n</ol>\n<ul>\n<li>P(k) = [1, 1/2, 1/3, 1/4, 1/5]</li>\n<li>P(k)rel(k) = [1, 0, 0, 0, 0]</li>\n</ul>\n<ol>\n<li>AP is the sum divided by m therefore 1/3*(1+0+0+0+0) = 0.33</li>\n</ol>",
      "rawMarkdown": "Hi,\nBased on your example we can do the following calculation:\n1. Customer bought articles 1, 4, 6 meaning m=3\n2. model prediction results are [1, 0, 0, 0, 0] therefore :\n - P(k) = [1, 1/2, 1/3, 1/4, 1/5]\n - P(k)rel(k) = [1, 0, 0, 0, 0]\n3. AP is the sum divided by m therefore 1/3*(1+0+0+0+0) = 0.33",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1747088,
      "author_name": "devanshchowdhury",
      "author_url": "",
      "post_date": "04/06/2022 10:37:55",
      "content": "<p><a href=\"https://www.kaggle.com/init27\" target=\"_blank\">@init27</a> Nice reference. Let me see that i get this right.Let's say customer bought articles 1 4 6.</p>\n<ol>\n<li>I submit 1 W W W W (W be something wrong). P(5) is 1 .5 .33 .25 .2 . AP(5) = sum of all P(5)/5 .MAP@5 would be mean of all the customer MP. I think that this should be right .right?</li>\n</ol>",
      "votes": null,
      "replies": [
        {
          "id": 1767104,
          "author_name": "ravivkerner",
          "author_url": "",
          "post_date": "04/25/2022 05:08:04",
          "content": "<p>Hi,<br>\nBased on your example we can do the following calculation:</p>\n<ol>\n<li>Customer bought articles 1, 4, 6 meaning m=3</li>\n<li>model prediction results are [1, 0, 0, 0, 0] therefore :</li>\n</ol>\n<ul>\n<li>P(k) = [1, 1/2, 1/3, 1/4, 1/5]</li>\n<li>P(k)rel(k) = [1, 0, 0, 0, 0]</li>\n</ul>\n<ol>\n<li>AP is the sum divided by m therefore 1/3*(1+0+0+0+0) = 0.33</li>\n</ol>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1680423": "I found this [Blog](https://sdsawtelle.github.io/blog/output/mean-average-precision-MAP-for-recommender-systems.html) to be a crispy read for understanding MAP in the Recsys world. \n\nGood Luck everyone!",
    "1747088": "init27 Nice reference. Let me see that i get this right.Let's say customer bought articles 1 4 6.\n1. I submit 1 W W W W (W be something wrong). P(5) is 1 .5 .33 .25 .2 . AP(5) = sum of all P(5)/5 .MAP@5 would be mean of all the customer MP. I think that this should be right .right?",
    "1767104": "Hi,\nBased on your example we can do the following calculation:\n1. Customer bought articles 1, 4, 6 meaning m=3\n2. model prediction results are [1, 0, 0, 0, 0] therefore :\n - P(k) = [1, 1/2, 1/3, 1/4, 1/5]\n - P(k)rel(k) = [1, 0, 0, 0, 0]\n3. AP is the sum divided by m therefore 1/3*(1+0+0+0+0) = 0.33"
  },
  "source": "meta"
}