{
  "id": 41559,
  "title": "Negative sales ",
  "url": "/competitions/favorita-grocery-sales-forecasting/discussion/41559",
  "author_name": "",
  "post_date": "2017-10-20T07:29:19.088911800Z",
  "votes": 14,
  "comment_count": 9,
  "views": 0,
  "content": "<p>According to the data description, there can be negative values because of return, yet we are asked to predict non negative values.  How is the metric computed when there are negative values in actuals because of returns?</p>",
  "messages": [
    {
      "id": "233439",
      "postDate": "10/20/2017 07:29:19",
      "content": "<p>According to the data description, there can be negative values because of return, yet we are asked to predict non negative values.  How is the metric computed when there are negative values in actuals because of returns?</p>",
      "rawMarkdown": "According to the data description, there can be negative values because of return, yet we are asked to predict non negative values.  How is the metric computed when there are negative values in actuals because of returns?",
      "votes": null
    },
    {
      "id": "233444",
      "postDate": "10/20/2017 07:48:18",
      "content": "<p>Clipped at zero, I would imagine - personally I do it before any data processing and don't look back. We're talking about 7795 observations out of a total of 125497040, so it's not that big of a deal.</p>",
      "rawMarkdown": "Clipped at zero, I would imagine - personally I do it before any data processing and don't look back. We're talking about 7795 observations out of a total of 125497040, so it's not that big of a deal.",
      "votes": null
    },
    {
      "id": "233466",
      "postDate": "10/20/2017 09:45:47",
      "content": "<p>Promotions? Free products?</p>",
      "rawMarkdown": "Promotions? Free products?",
      "votes": null
    },
    {
      "id": "233523",
      "postDate": "10/20/2017 13:00:36",
      "content": "<p>Konrad is correct. Negative sales are treated at zero sales in the Test set. (And fwiw, the percentage of negative rows in the Test set was actually less than in Train, so, we're talking ~0.0001% of the rows that were clipped from a negative number to zero.)</p>",
      "rawMarkdown": "Konrad is correct. Negative sales are treated at zero sales in the Test set. (And fwiw, the percentage of negative rows in the Test set was actually less than in Train, so, we're talking ~0.0001% of the rows that were clipped from a negative number to zero.)",
      "votes": null
    },
    {
      "id": "235305",
      "postDate": "10/25/2017 04:59:31",
      "content": "<p>Not free but discounted.</p>",
      "rawMarkdown": "Not free but discounted.",
      "votes": null
    },
    {
      "id": "238358",
      "postDate": "11/01/2017 08:08:49",
      "content": "<p>From my experience, traditionally, negative sales in retail represent returned products</p>",
      "rawMarkdown": "From my experience, traditionally, negative sales in retail represent returned products",
      "votes": null
    },
    {
      "id": "252126",
      "postDate": "12/02/2017 09:56:10",
      "content": "<p>Not sure whether my solution is ok. Plus both real y and predicted y with abs(min(unit_sales)) then evaluate the result</p>",
      "rawMarkdown": "Not sure whether my solution is ok. Plus both real y and predicted y with abs(min(unit_sales)) then evaluate the result",
      "votes": null
    },
    {
      "id": "252266",
      "postDate": "12/02/2017 16:23:06",
      "content": "<p>If the negative sales are returned products when has the normal sale been taken  place? At the date of file or at some other date in the past?</p>",
      "rawMarkdown": "If the negative sales are returned products when has the normal sale been taken  place? At the date of file or at some other date in the past?",
      "votes": null
    },
    {
      "id": "256888",
      "postDate": "12/12/2017 22:08:30",
      "content": "<p>This is something I have wondered myself.  Can you let me know if you find an answer?  </p>\n\n<p>I know the reason why we cannot have negative is because apparently one can skew competition score result to get a higher score than normal through negative forecasts.  At least that what my professor in my group said after reading people's comments.</p>\n\n<p>However, overall model accuracy is important beyond what we give to judges.  The goal of this competition is to produce a forcasting product Favorita can use.</p>",
      "rawMarkdown": "This is something I have wondered myself.  Can you let me know if you find an answer?  \n\nI know the reason why we cannot have negative is because apparently one can skew competition score result to get a higher score than normal through negative forecasts.  At least that what my professor in my group said after reading people's comments.\n\nHowever, overall model accuracy is important beyond what we give to judges.  The goal of this competition is to produce a forcasting product Favorita can use.",
      "votes": null
    },
    {
      "id": "256891",
      "postDate": "12/12/2017 22:09:41",
      "content": "<p>You could also try setting the forecast of negative results to zero.  This is typically what is done for when forecasts can only be positive like in population forecasting.</p>",
      "rawMarkdown": "You could also try setting the forecast of negative results to zero.  This is typically what is done for when forecasts can only be positive like in population forecasting.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 233444,
      "author_name": "konradb",
      "author_url": "",
      "post_date": "10/20/2017 07:48:18",
      "content": "<p>Clipped at zero, I would imagine - personally I do it before any data processing and don't look back. We're talking about 7795 observations out of a total of 125497040, so it's not that big of a deal.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 233466,
      "author_name": "johnlovelove",
      "author_url": "",
      "post_date": "10/20/2017 09:45:47",
      "content": "<p>Promotions? Free products?</p>",
      "votes": null,
      "replies": [
        {
          "id": 235305,
          "author_name": "gyorgy",
          "author_url": "",
          "post_date": "10/25/2017 04:59:31",
          "content": "<p>Not free but discounted.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 233523,
      "author_name": "inversion",
      "author_url": "",
      "post_date": "10/20/2017 13:00:36",
      "content": "<p>Konrad is correct. Negative sales are treated at zero sales in the Test set. (And fwiw, the percentage of negative rows in the Test set was actually less than in Train, so, we're talking ~0.0001% of the rows that were clipped from a negative number to zero.)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 238358,
      "author_name": "christophes",
      "author_url": "",
      "post_date": "11/01/2017 08:08:49",
      "content": "<p>From my experience, traditionally, negative sales in retail represent returned products</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 252126,
      "author_name": "robinhoo1973",
      "author_url": "",
      "post_date": "12/02/2017 09:56:10",
      "content": "<p>Not sure whether my solution is ok. Plus both real y and predicted y with abs(min(unit_sales)) then evaluate the result</p>",
      "votes": null,
      "replies": [
        {
          "id": 256891,
          "author_name": "skyrmion",
          "author_url": "",
          "post_date": "12/12/2017 22:09:41",
          "content": "<p>You could also try setting the forecast of negative results to zero.  This is typically what is done for when forecasts can only be positive like in population forecasting.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 252266,
      "author_name": "georgem",
      "author_url": "",
      "post_date": "12/02/2017 16:23:06",
      "content": "<p>If the negative sales are returned products when has the normal sale been taken  place? At the date of file or at some other date in the past?</p>",
      "votes": null,
      "replies": [
        {
          "id": 256888,
          "author_name": "skyrmion",
          "author_url": "",
          "post_date": "12/12/2017 22:08:30",
          "content": "<p>This is something I have wondered myself.  Can you let me know if you find an answer?  </p>\n\n<p>I know the reason why we cannot have negative is because apparently one can skew competition score result to get a higher score than normal through negative forecasts.  At least that what my professor in my group said after reading people's comments.</p>\n\n<p>However, overall model accuracy is important beyond what we give to judges.  The goal of this competition is to produce a forcasting product Favorita can use.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "233439": "According to the data description, there can be negative values because of return, yet we are asked to predict non negative values.  How is the metric computed when there are negative values in actuals because of returns?",
    "233444": "Clipped at zero, I would imagine - personally I do it before any data processing and don't look back. We're talking about 7795 observations out of a total of 125497040, so it's not that big of a deal.",
    "233466": "Promotions? Free products?",
    "233523": "Konrad is correct. Negative sales are treated at zero sales in the Test set. (And fwiw, the percentage of negative rows in the Test set was actually less than in Train, so, we're talking ~0.0001% of the rows that were clipped from a negative number to zero.)",
    "235305": "Not free but discounted.",
    "238358": "From my experience, traditionally, negative sales in retail represent returned products",
    "252126": "Not sure whether my solution is ok. Plus both real y and predicted y with abs(min(unit_sales)) then evaluate the result",
    "252266": "If the negative sales are returned products when has the normal sale been taken  place? At the date of file or at some other date in the past?",
    "256888": "This is something I have wondered myself.  Can you let me know if you find an answer?  \n\nI know the reason why we cannot have negative is because apparently one can skew competition score result to get a higher score than normal through negative forecasts.  At least that what my professor in my group said after reading people's comments.\n\nHowever, overall model accuracy is important beyond what we give to judges.  The goal of this competition is to produce a forcasting product Favorita can use.",
    "256891": "You could also try setting the forecast of negative results to zero.  This is typically what is done for when forecasts can only be positive like in population forecasting."
  },
  "source": "meta"
}