{
  "id": 306861,
  "title": "Could score value (MAP) be greater than 1??",
  "url": "/competitions/h-and-m-personalized-fashion-recommendations/discussion/306861",
  "author_name": "",
  "post_date": "2022-02-11T08:44:15.549245300Z",
  "votes": 6,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Hello. I have a question. Maybe I misunderstood metric, but I'm a little bit confuse about what if we get score greater than 1? For example: let's take just one customer. Let's assume we predicted 3 articles for he/she: a1, a2, a3 - in this order. Let's assume that a1 and a3 are correct prediction, but a2 is wrong. So score can be computed as: map = P(1)*rel(1) + P(2)*rel(2) + P(3)*rel(3) = 1*1 + 0.5*0 + 0.66*1 = 1.66. So our MAP for one customer is 1.66 - greater than 1. Tell me please - is it possible? Or my formula is wrong?</p>",
  "messages": [
    {
      "id": "1685403",
      "postDate": "02/11/2022 08:44:15",
      "content": "<p>Hello. I have a question. Maybe I misunderstood metric, but I'm a little bit confuse about what if we get score greater than 1? For example: let's take just one customer. Let's assume we predicted 3 articles for he/she: a1, a2, a3 - in this order. Let's assume that a1 and a3 are correct prediction, but a2 is wrong. So score can be computed as: map = P(1)*rel(1) + P(2)*rel(2) + P(3)*rel(3) = 1*1 + 0.5*0 + 0.66*1 = 1.66. So our MAP for one customer is 1.66 - greater than 1. Tell me please - is it possible? Or my formula is wrong?</p>",
      "rawMarkdown": "Hello. I have a question. Maybe I misunderstood metric, but I'm a little bit confuse about what if we get score greater than 1? For example: let's take just one customer. Let's assume we predicted 3 articles for he/she: a1, a2, a3 - in this order. Let's assume that a1 and a3 are correct prediction, but a2 is wrong. So score can be computed as: map = P(1)\\*rel(1) + P(2)\\*rel(2) + P(3)\\*rel(3) = 1\\*1 + 0.5\\*0 + 0.66\\*1 = 1.66. So our MAP for one customer is 1.66 - greater than 1. Tell me please - is it possible? Or my formula is wrong?",
      "votes": null
    },
    {
      "id": "1685718",
      "postDate": "02/11/2022 13:53:43",
      "content": "<p>1.66 should be divided by the number of customers! Look again “Overview- Evaluation ”</p>",
      "rawMarkdown": "1.66 should be divided by the number of customers! Look again “Overview- Evaluation ”",
      "votes": null
    },
    {
      "id": "1685760",
      "postDate": "02/11/2022 14:23:32",
      "content": "<p>MAP should be between 0.0 and 1.0. Check the formulas used in <a href=\"https://www.kaggle.com/debarshichanda/understanding-mean-average-precision\" target=\"_blank\">Understanding Mean Average Precision</a>, specifically the <code>average_precision_at_k</code> function. It looks like you have the sum of precisions at k correct, but you're not dividing by k in the end.</p>",
      "rawMarkdown": "MAP should be between 0.0 and 1.0. Check the formulas used in [Understanding Mean Average Precision](https://www.kaggle.com/debarshichanda/understanding-mean-average-precision), specifically the `average_precision_at_k` function. It looks like you have the sum of precisions at k correct, but you're not dividing by k in the end.",
      "votes": null
    },
    {
      "id": "1686277",
      "postDate": "02/11/2022 22:26:02",
      "content": "<p>Your formula is correct according to what is mentioned in the <code>Evaluation</code> tab but I think that there is a slight mistake in the formula mentioned there. You can check <a href=\"https://www.kaggle.com/c/h-and-m-personalized-fashion-recommendations/discussion/306007#1683460\" target=\"_blank\">this</a> though there hasn't been a clarification from the organizers or Kaggle</p>\n<p>You just need to divide by <code>k</code> to have it in the range 0-1</p>",
      "rawMarkdown": "Your formula is correct according to what is mentioned in the `Evaluation` tab but I think that there is a slight mistake in the formula mentioned there. You can check [this](https://www.kaggle.com/c/h-and-m-personalized-fashion-recommendations/discussion/306007#1683460) though there hasn't been a clarification from the organizers or Kaggle\n\nYou just need to divide by `k` to have it in the range 0-1",
      "votes": null
    },
    {
      "id": "1686654",
      "postDate": "02/12/2022 08:43:04",
      "content": "<p>Suppose you have 3 customers and you get MAP 1.66 for every of them. So if you sum all 1.66 and divide by 3, you get the same 1.66. The answer is below - probably <em>k</em> is missed in formula.</p>",
      "rawMarkdown": "Suppose you have 3 customers and you get MAP 1.66 for every of them. So if you sum all 1.66 and divide by 3, you get the same 1.66. The answer is below - probably *k* is missed in formula.",
      "votes": null
    },
    {
      "id": "1686662",
      "postDate": "02/12/2022 08:48:32",
      "content": "<p>Thank you. It clarifies</p>",
      "rawMarkdown": "Thank you. It clarifies",
      "votes": null
    },
    {
      "id": "1686663",
      "postDate": "02/12/2022 08:48:37",
      "content": "<p>Thank you. It clarifies</p>",
      "rawMarkdown": "Thank you. It clarifies",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1685718,
      "author_name": "kotaronoguchi",
      "author_url": "",
      "post_date": "02/11/2022 13:53:43",
      "content": "<p>1.66 should be divided by the number of customers! Look again “Overview- Evaluation ”</p>",
      "votes": null,
      "replies": [
        {
          "id": 1686654,
          "author_name": "jwegas",
          "author_url": "",
          "post_date": "02/12/2022 08:43:04",
          "content": "<p>Suppose you have 3 customers and you get MAP 1.66 for every of them. So if you sum all 1.66 and divide by 3, you get the same 1.66. The answer is below - probably <em>k</em> is missed in formula.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1685760,
      "author_name": "bcruise",
      "author_url": "",
      "post_date": "02/11/2022 14:23:32",
      "content": "<p>MAP should be between 0.0 and 1.0. Check the formulas used in <a href=\"https://www.kaggle.com/debarshichanda/understanding-mean-average-precision\" target=\"_blank\">Understanding Mean Average Precision</a>, specifically the <code>average_precision_at_k</code> function. It looks like you have the sum of precisions at k correct, but you're not dividing by k in the end.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1686662,
          "author_name": "jwegas",
          "author_url": "",
          "post_date": "02/12/2022 08:48:32",
          "content": "<p>Thank you. It clarifies</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1686277,
      "author_name": "debarshichanda",
      "author_url": "",
      "post_date": "02/11/2022 22:26:02",
      "content": "<p>Your formula is correct according to what is mentioned in the <code>Evaluation</code> tab but I think that there is a slight mistake in the formula mentioned there. You can check <a href=\"https://www.kaggle.com/c/h-and-m-personalized-fashion-recommendations/discussion/306007#1683460\" target=\"_blank\">this</a> though there hasn't been a clarification from the organizers or Kaggle</p>\n<p>You just need to divide by <code>k</code> to have it in the range 0-1</p>",
      "votes": null,
      "replies": [
        {
          "id": 1686663,
          "author_name": "jwegas",
          "author_url": "",
          "post_date": "02/12/2022 08:48:37",
          "content": "<p>Thank you. It clarifies</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1685403": "Hello. I have a question. Maybe I misunderstood metric, but I'm a little bit confuse about what if we get score greater than 1? For example: let's take just one customer. Let's assume we predicted 3 articles for he/she: a1, a2, a3 - in this order. Let's assume that a1 and a3 are correct prediction, but a2 is wrong. So score can be computed as: map = P(1)\\*rel(1) + P(2)\\*rel(2) + P(3)\\*rel(3) = 1\\*1 + 0.5\\*0 + 0.66\\*1 = 1.66. So our MAP for one customer is 1.66 - greater than 1. Tell me please - is it possible? Or my formula is wrong?",
    "1685718": "1.66 should be divided by the number of customers! Look again “Overview- Evaluation ”",
    "1685760": "MAP should be between 0.0 and 1.0. Check the formulas used in [Understanding Mean Average Precision](https://www.kaggle.com/debarshichanda/understanding-mean-average-precision), specifically the `average_precision_at_k` function. It looks like you have the sum of precisions at k correct, but you're not dividing by k in the end.",
    "1686277": "Your formula is correct according to what is mentioned in the `Evaluation` tab but I think that there is a slight mistake in the formula mentioned there. You can check [this](https://www.kaggle.com/c/h-and-m-personalized-fashion-recommendations/discussion/306007#1683460) though there hasn't been a clarification from the organizers or Kaggle\n\nYou just need to divide by `k` to have it in the range 0-1",
    "1686654": "Suppose you have 3 customers and you get MAP 1.66 for every of them. So if you sum all 1.66 and divide by 3, you get the same 1.66. The answer is below - probably *k* is missed in formula.",
    "1686662": "Thank you. It clarifies",
    "1686663": "Thank you. It clarifies"
  },
  "source": "meta"
}