{
  "id": 67873,
  "title": "Oversampling",
  "url": "/competitions/ga-customer-revenue-prediction/discussion/67873",
  "author_name": "Aguiar",
  "post_date": "2018-10-06T15:51:50.589000",
  "votes": 3,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Has anyone had success with under- or over-sampling techniques for classification or regression? I've tryed under-sampling the zero revenue visits and applying regression, but results were not good. The same happened with a ensemble of multiple samples.</p>\n\n<p>For oversampling I used a label \"has_revenue\" as target for Smote and treated the actual numeric revenue as a standard feature. With this approach I got much better scores, but still worse than regular models. Maybe a more refined technique could work here - at least for classification.</p>",
  "messages": [
    {
      "id": 399734,
      "postDate": "2018-10-06T15:51:50.590Z",
      "content": "<p>Has anyone had success with under- or over-sampling techniques for classification or regression? I've tryed under-sampling the zero revenue visits and applying regression, but results were not good. The same happened with a ensemble of multiple samples.</p>\n\n<p>For oversampling I used a label \"has_revenue\" as target for Smote and treated the actual numeric revenue as a standard feature. With this approach I got much better scores, but still worse than regular models. Maybe a more refined technique could work here - at least for classification.</p>",
      "rawMarkdown": "Has anyone had success with under- or over-sampling techniques for classification or regression? I've tryed under-sampling the zero revenue visits and applying regression, but results were not good. The same happened with a ensemble of multiple samples.\n\nFor oversampling I used a label \"has_revenue\" as target for Smote and treated the actual numeric revenue as a standard feature. With this approach I got much better scores, but still worse than regular models. Maybe a more refined technique could work here - at least for classification.\n",
      "votes": 2
    },
    {
      "id": 399791,
      "postDate": "2018-10-06T19:14:33.517Z",
      "content": "<p>I tried under sampling, which gave predictions with a much better distribution (visually at least) but score was terrible (around 2 or 3) </p>\n\n<p>See here: <a href=\"https://www.kaggle.com/xavierbourretsicotte/lgbm-error-analysis-negative-downsampling\">https://www.kaggle.com/xavierbourretsicotte/lgbm-error-analysis-negative-downsampling</a></p>\n\n<p>and here: <a href=\"https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/67883\">https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/67883</a></p>",
      "rawMarkdown": "I tried under sampling, which gave predictions with a much better distribution (visually at least) but score was terrible (around 2 or 3) \n\nSee here: https://www.kaggle.com/xavierbourretsicotte/lgbm-error-analysis-negative-downsampling\n\nand here: https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/67883"
    },
    {
      "id": 399815,
      "postDate": "2018-10-06T20:51:18.473Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 399833,
          "postDate": "2018-10-06T22:08:52.520Z",
          "content": "<p>No false negatives is a good start - perhaps try setting all values predicted as negative (zero I presume ?) to have value zero ? </p>\n\n<p>Anyways from my trial and error it seems that despite everything there is some information contained in the bounces = 1 rows, because simply removing them from the training set worsens the LB as well... mysterious</p>",
          "rawMarkdown": "No false negatives is a good start - perhaps try setting all values predicted as negative (zero I presume ?) to have value zero ? \n\nAnyways from my trial and error it seems that despite everything there is some information contained in the bounces = 1 rows, because simply removing them from the training set worsens the LB as well... mysterious"
        },
        {
          "id": 400350,
          "postDate": "2018-10-08T06:43:43.770Z",
          "content": "<p>I have just started building a model and did simple linear regression . Almost all predicted values are negative when the actual transaction value is 0 . Moreover , the magnitudes are so insanely high , I will use a different model. linear regression wont be a good choice</p>",
          "rawMarkdown": "I have just started building a model and did simple linear regression . Almost all predicted values are negative when the actual transaction value is 0 . Moreover , the magnitudes are so insanely high , I will use a different model. linear regression wont be a good choice"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 399791,
      "author_name": "Xavier Bourret Sicotte",
      "author_url": "",
      "post_date": "2018-10-06T19:14:33.517000",
      "content": "<p>I tried under sampling, which gave predictions with a much better distribution (visually at least) but score was terrible (around 2 or 3) </p>\n\n<p>See here: <a href=\"https://www.kaggle.com/xavierbourretsicotte/lgbm-error-analysis-negative-downsampling\">https://www.kaggle.com/xavierbourretsicotte/lgbm-error-analysis-negative-downsampling</a></p>\n\n<p>and here: <a href=\"https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/67883\">https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/67883</a></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 399815,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-10-06T20:51:18.473000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 399833,
          "author_name": "Xavier Bourret Sicotte",
          "author_url": "",
          "post_date": "2018-10-06T22:08:52.520000",
          "content": "<p>No false negatives is a good start - perhaps try setting all values predicted as negative (zero I presume ?) to have value zero ? </p>\n\n<p>Anyways from my trial and error it seems that despite everything there is some information contained in the bounces = 1 rows, because simply removing them from the training set worsens the LB as well... mysterious</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 400350,
          "author_name": "Abhishek",
          "author_url": "",
          "post_date": "2018-10-08T06:43:43.770000",
          "content": "<p>I have just started building a model and did simple linear regression . Almost all predicted values are negative when the actual transaction value is 0 . Moreover , the magnitudes are so insanely high , I will use a different model. linear regression wont be a good choice</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "399734": "Has anyone had success with under- or over-sampling techniques for classification or regression? I've tryed under-sampling the zero revenue visits and applying regression, but results were not good. The same happened with a ensemble of multiple samples.\n\nFor oversampling I used a label \"has_revenue\" as target for Smote and treated the actual numeric revenue as a standard feature. With this approach I got much better scores, but still worse than regular models. Maybe a more refined technique could work here - at least for classification.\n",
    "399791": "I tried under sampling, which gave predictions with a much better distribution (visually at least) but score was terrible (around 2 or 3) \n\nSee here: https://www.kaggle.com/xavierbourretsicotte/lgbm-error-analysis-negative-downsampling\n\nand here: https://www.kaggle.com/c/ga-customer-revenue-prediction/discussion/67883",
    "399815": ""
  }
}