{
  "id": 56549,
  "title": "Negative predicted values with Light GBM",
  "url": "/competitions/avito-demand-prediction/discussion/56549",
  "author_name": "",
  "post_date": "2018-05-11T02:06:10.728184700Z",
  "votes": 2,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Hello All,</p>\n\n<p>I have never used Light GBM for a regression problem and have some experience using for classification problem. The issue is: I am getting some of the predicted values negative. I am not sure if I am missing something to mention in the parameters or something related to preprocessing. </p>\n\n<p>Thank you.</p>",
  "messages": [
    {
      "id": "327195",
      "postDate": "05/11/2018 02:06:10",
      "content": "<p>Hello All,</p>\n\n<p>I have never used Light GBM for a regression problem and have some experience using for classification problem. The issue is: I am getting some of the predicted values negative. I am not sure if I am missing something to mention in the parameters or something related to preprocessing. </p>\n\n<p>Thank you.</p>",
      "rawMarkdown": "Hello All,\n\nI have never used Light GBM for a regression problem and have some experience using for classification problem. The issue is: I am getting some of the predicted values negative. I am not sure if I am missing something to mention in the parameters or something related to preprocessing. \n\nThank you.",
      "votes": null
    },
    {
      "id": "327220",
      "postDate": "05/11/2018 03:32:40",
      "content": "<p>You're not missing anything: optimizing purely on RMSE does not prevent the algo from predicting negative values now and then. Clipping to the unit interval, the way some of the popular kernels do it, helps :-)</p>",
      "rawMarkdown": "You're not missing anything: optimizing purely on RMSE does not prevent the algo from predicting negative values now and then. Clipping to the unit interval, the way some of the popular kernels do it, helps :-)",
      "votes": null
    },
    {
      "id": "327394",
      "postDate": "05/11/2018 12:48:25",
      "content": "<p>Thank you, Konrad! :)\nThat is really helpful.</p>",
      "rawMarkdown": "Thank you, Konrad! :)\nThat is really helpful.",
      "votes": null
    },
    {
      "id": "327487",
      "postDate": "05/11/2018 16:42:51",
      "content": "<p>@Konrad: what do you recommend optimizing on for Avito?  </p>",
      "rawMarkdown": "Konrad: what do you recommend optimizing on for Avito?",
      "votes": null
    },
    {
      "id": "327490",
      "postDate": "05/11/2018 16:51:55",
      "content": "<p>Assuming you don't want to create a customized loss (which, for the record, I am not doing:-) either RMSE + clipping (on original data scale) or switch to log1p(deal_probability), MSE/RMSE there, then flip back to original scale. </p>",
      "rawMarkdown": "Assuming you don't want to create a customized loss (which, for the record, I am not doing:-) either RMSE + clipping (on original data scale) or switch to log1p(deal_probability), MSE/RMSE there, then flip back to original scale.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 327220,
      "author_name": "konradb",
      "author_url": "",
      "post_date": "05/11/2018 03:32:40",
      "content": "<p>You're not missing anything: optimizing purely on RMSE does not prevent the algo from predicting negative values now and then. Clipping to the unit interval, the way some of the popular kernels do it, helps :-)</p>",
      "votes": null,
      "replies": [
        {
          "id": 327394,
          "author_name": "pratikkgandhi",
          "author_url": "",
          "post_date": "05/11/2018 12:48:25",
          "content": "<p>Thank you, Konrad! :)\nThat is really helpful.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 327487,
          "author_name": "shadowwarrior",
          "author_url": "",
          "post_date": "05/11/2018 16:42:51",
          "content": "<p>@Konrad: what do you recommend optimizing on for Avito?  </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 327490,
          "author_name": "konradb",
          "author_url": "",
          "post_date": "05/11/2018 16:51:55",
          "content": "<p>Assuming you don't want to create a customized loss (which, for the record, I am not doing:-) either RMSE + clipping (on original data scale) or switch to log1p(deal_probability), MSE/RMSE there, then flip back to original scale. </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "327195": "Hello All,\n\nI have never used Light GBM for a regression problem and have some experience using for classification problem. The issue is: I am getting some of the predicted values negative. I am not sure if I am missing something to mention in the parameters or something related to preprocessing. \n\nThank you.",
    "327220": "You're not missing anything: optimizing purely on RMSE does not prevent the algo from predicting negative values now and then. Clipping to the unit interval, the way some of the popular kernels do it, helps :-)",
    "327394": "Thank you, Konrad! :)\nThat is really helpful.",
    "327487": "Konrad: what do you recommend optimizing on for Avito?",
    "327490": "Assuming you don't want to create a customized loss (which, for the record, I am not doing:-) either RMSE + clipping (on original data scale) or switch to log1p(deal_probability), MSE/RMSE there, then flip back to original scale."
  },
  "source": "meta"
}