{
  "id": 67229,
  "title": "What am I doing wrong?",
  "url": "/competitions/ga-customer-revenue-prediction/discussion/67229",
  "author_name": "AmirH",
  "post_date": "2018-09-30T09:52:59.004000",
  "votes": 13,
  "comment_count": 21,
  "views": 0,
  "content": "<p>Hi Kagglers,</p>\n\n<p>I'm getting really frustrated with this competition.\nSeems like anything I do that generates better CV, gets worse LB.\nMy position is pretty bad.</p>\n\n<p>I started out using time based validation with 3 last months as validation set.\nI had some 1.44~ submissions using this validation.</p>\n\n<p>It's easier for me to use 5 fold validation as i can also use these folds for mean encodings, OOF stacking, averaged CV score , implementing oof binary classification to use in model etc.</p>\n\n<p>As I don't see any reason not to use 5 fold CV here, i generated 5 Folds by group of fullVisitorId. (all rows of a specific fullvisitorId are always in the same fold).\nSince doing that, anything i seem to be doing , without any high risk things such as mean encodings etc. I get scores of 1.45-1.47\neven using only simple features such as:</p>\n\n<p>\"channelGrouping\", \"visitNumber\", \"browser\", \"operatingSystem\", \"isMobile\", \"deviceCategory\", \"continent\", \"subContinent\", \"country\", \"region\", \"metro\", \"city\", \"networkDomain\", \"hits\", \"pageviews\", \"newVisits\", \"bounces\", \"source\", \"medium\", \"keyword\", \"isTrueDirect\", \"referralPath\", \"VisitMonth\", \"VisitDay\", \"VisitWeekDay\", \"VisitHour\", \"CountVisitorVisits\", \"Location\", \"IsMulti\", \"Maxhits\", \"Meanhits\", \"Medianhits\", \"Maxpageviews\", \"Meanpageviews\", \"Medianpageviews\", \"DaysActive\" </p>\n\n<p>(categories are label encoded)\nwith LGBM with parameters:</p>\n\n<p>list(objective = \"regression\",\n                          metric = \"RMSE\",\n                          learning_rate= 0.03,\n                          num_leaves= 40, #16\n                          #max_depth= 12,    #3\n                          #max_bin= 255,\n                          subsample= 0.9,\n                          subsample_freq= 1,\n                          colsample_bytree=0.9)</p>\n\n<p>I use lgbm's lgb.cv with my 5folds  and then retrain on entire data with best.iteration.</p>\n\n<p>Any suggestions?\nI'm really frustrated.</p>\n\n<p>I don't like forking and using kernels much, I also use R\nI saw @Olivier using 5 fold validation with very simple model and getting better scores.\nI tried session level, user level.. I just don't understand!!\nDoes anyone else experience the same?</p>\n\n<ul>\n<li><p>What CV method are you using?</p></li>\n<li><p>How does one do mean encoding \\ OOF predictions when using 1 set of train and 1 set of validation, without having folds?</p></li>\n</ul>\n\n<p>Thanks!\nAmir.</p>",
  "messages": [
    {
      "id": 396235,
      "postDate": "2018-09-30T09:52:59.003Z",
      "content": "<p>Hi Kagglers,</p>\n\n<p>I'm getting really frustrated with this competition.\nSeems like anything I do that generates better CV, gets worse LB.\nMy position is pretty bad.</p>\n\n<p>I started out using time based validation with 3 last months as validation set.\nI had some 1.44~ submissions using this validation.</p>\n\n<p>It's easier for me to use 5 fold validation as i can also use these folds for mean encodings, OOF stacking, averaged CV score , implementing oof binary classification to use in model etc.</p>\n\n<p>As I don't see any reason not to use 5 fold CV here, i generated 5 Folds by group of fullVisitorId. (all rows of a specific fullvisitorId are always in the same fold).\nSince doing that, anything i seem to be doing , without any high risk things such as mean encodings etc. I get scores of 1.45-1.47\neven using only simple features such as:</p>\n\n<p>\"channelGrouping\", \"visitNumber\", \"browser\", \"operatingSystem\", \"isMobile\", \"deviceCategory\", \"continent\", \"subContinent\", \"country\", \"region\", \"metro\", \"city\", \"networkDomain\", \"hits\", \"pageviews\", \"newVisits\", \"bounces\", \"source\", \"medium\", \"keyword\", \"isTrueDirect\", \"referralPath\", \"VisitMonth\", \"VisitDay\", \"VisitWeekDay\", \"VisitHour\", \"CountVisitorVisits\", \"Location\", \"IsMulti\", \"Maxhits\", \"Meanhits\", \"Medianhits\", \"Maxpageviews\", \"Meanpageviews\", \"Medianpageviews\", \"DaysActive\" </p>\n\n<p>(categories are label encoded)\nwith LGBM with parameters:</p>\n\n<p>list(objective = \"regression\",\n                          metric = \"RMSE\",\n                          learning_rate= 0.03,\n                          num_leaves= 40, #16\n                          #max_depth= 12,    #3\n                          #max_bin= 255,\n                          subsample= 0.9,\n                          subsample_freq= 1,\n                          colsample_bytree=0.9)</p>\n\n<p>I use lgbm's lgb.cv with my 5folds  and then retrain on entire data with best.iteration.</p>\n\n<p>Any suggestions?\nI'm really frustrated.</p>\n\n<p>I don't like forking and using kernels much, I also use R\nI saw @Olivier using 5 fold validation with very simple model and getting better scores.\nI tried session level, user level.. I just don't understand!!\nDoes anyone else experience the same?</p>\n\n<ul>\n<li><p>What CV method are you using?</p></li>\n<li><p>How does one do mean encoding \\ OOF predictions when using 1 set of train and 1 set of validation, without having folds?</p></li>\n</ul>\n\n<p>Thanks!\nAmir.</p>",
      "rawMarkdown": "Hi Kagglers,\n\nI'm getting really frustrated with this competition.\nSeems like anything I do that generates better CV, gets worse LB.\nMy position is pretty bad.\n\nI started out using time based validation with 3 last months as validation set.\nI had some 1.44~ submissions using this validation.\n\nIt's easier for me to use 5 fold validation as i can also use these folds for mean encodings, OOF stacking, averaged CV score , implementing oof binary classification to use in model etc.\n\nAs I don't see any reason not to use 5 fold CV here, i generated 5 Folds by group of fullVisitorId. (all rows of a specific fullvisitorId are always in the same fold).\nSince doing that, anything i seem to be doing , without any high risk things such as mean encodings etc. I get scores of 1.45-1.47\neven using only simple features such as:\n\n\n\n\"channelGrouping\", \"visitNumber\", \"browser\", \"operatingSystem\", \"isMobile\", \"deviceCategory\", \"continent\", \"subContinent\", \"country\", \"region\", \"metro\", \"city\", \"networkDomain\", \"hits\", \"pageviews\", \"newVisits\", \"bounces\", \"source\", \"medium\", \"keyword\", \"isTrueDirect\", \"referralPath\", \"VisitMonth\", \"VisitDay\", \"VisitWeekDay\", \"VisitHour\", \"CountVisitorVisits\", \"Location\", \"IsMulti\", \"Maxhits\", \"Meanhits\", \"Medianhits\", \"Maxpageviews\", \"Meanpageviews\", \"Medianpageviews\", \"DaysActive\" \n\n\n (categories are label encoded)\nwith LGBM with parameters:\n\nlist(objective = \"regression\",\n                          metric = \"RMSE\",\n                          learning_rate= 0.03,\n                          num_leaves= 40, #16\n                          #max_depth= 12,    #3\n                          #max_bin= 255,\n                          subsample= 0.9,\n                          subsample_freq= 1,\n                          colsample_bytree=0.9)\n\n\n\nI use lgbm's lgb.cv with my 5folds  and then retrain on entire data with best.iteration.\n \nAny suggestions?\nI'm really frustrated.\n\nI don't like forking and using kernels much, I also use R\nI saw @Olivier using 5 fold validation with very simple model and getting better scores.\nI tried session level, user level.. I just don't understand!!\nDoes anyone else experience the same?\n\n\n- What CV method are you using?\n\n- How does one do mean encoding \\ OOF predictions when using 1 set of train and 1 set of validation, without having folds?\n\n\nThanks!\nAmir.\n\n",
      "votes": 12
    },
    {
      "id": 396322,
      "postDate": "2018-09-30T13:13:43.360Z",
      "content": "<p>@AmirH</p>\n\n<p>It is true that this competition is a little bit strange ! </p>\n\n<p>Here are 'my' best params I normally use on this file : </p>\n\n<p>params = {'objective': 'reg:linear',\n          'eval_metric': 'rmse',\n          'eta': 0.001,\n          'max_depth': 8,\n          'subsample': 0.7,\n          'colsample_bytree': 0.8,\n          'alpha':0.001,\n          'num_leaves' : 63,\n          'random_state': 42,\n          'silent': True,\n          }</p>\n\n<p>Don't forget early_stopping : I usually use a low 20 rounds compared to a lot of kernels you can find. The higher the risk of overfitting is possible</p>\n\n<p>'<strong>subsample</strong>': 0.7 is the number of random rows you use and '<strong>colsample_bytree</strong>': 0.8 the same for colums to use. This add randomness to your evaluation. 0.9 is  according to me most of the times too high.</p>\n\n<p>There is no standard rule, it depends on your -<strong><em>own</em></strong>- file. Just play and try, and don't forget to keep track of your Local and LB scores.</p>\n\n<p>Good luck !</p>",
      "rawMarkdown": "@AmirH\n\nIt is true that this competition is a little bit strange ! \n\nHere are 'my' best params I normally use on this file : \n\nparams = {'objective': 'reg:linear',\n          'eval_metric': 'rmse',\n          'eta': 0.001,\n          'max_depth': 8,\n          'subsample': 0.7,\n          'colsample_bytree': 0.8,\n          'alpha':0.001,\n          'num_leaves' : 63,\n          'random_state': 42,\n          'silent': True,\n          }\n\nDon't forget early_stopping : I usually use a low 20 rounds compared to a lot of kernels you can find. The higher the risk of overfitting is possible\n\n'**subsample**': 0.7 is the number of random rows you use and '**colsample_bytree**': 0.8 the same for colums to use. This add randomness to your evaluation. 0.9 is  according to me most of the times too high.\n\nThere is no standard rule, it depends on your -***own***- file. Just play and try, and don't forget to keep track of your Local and LB scores.\n\nGood luck !",
      "votes": 6,
      "replies": [
        {
          "id": 399336,
          "postDate": "2018-10-05T16:17:22.500Z",
          "content": "<p>How did you choose those LGBM parameters? In particular, the very low learning rate is interesting to me. In combination with low early stopping, are you sure that allows the training to climb out of shallow local minima?</p>",
          "rawMarkdown": "How did you choose those LGBM parameters? In particular, the very low learning rate is interesting to me. In combination with low early stopping, are you sure that allows the training to climb out of shallow local minima?",
          "votes": 1
        },
        {
          "id": 399433,
          "postDate": "2018-10-05T19:16:40.747Z",
          "content": "<p>@Misha Lisovyi</p>\n\n<p>A very low learning rate (lr) is ok when you trust your model... <strong>BUT</strong> don't forget to lower your 'early_stopping' 20/50 is a maximum when you play with a low lr or you will easily overfit.</p>\n\n<p>The problem is that the model will train for a long time. The solution to reduce time for training/predicting  is using GPU as a device in LGB params : 'device' : 'GPU'</p>\n\n<p>HTH</p>",
          "rawMarkdown": "@Misha Lisovyi\n\nA very low learning rate (lr) is ok when you trust your model... **BUT** don't forget to lower your 'early_stopping' 20/50 is a maximum when you play with a low lr or you will easily overfit.\n\nThe problem is that the model will train for a long time. The solution to reduce time for training/predicting  is using GPU as a device in LGB params : 'device' : 'GPU'\n\nHTH"
        }
      ]
    },
    {
      "id": 396811,
      "postDate": "2018-10-01T12:12:57.353Z",
      "content": "<p>I've focused on how to interact the category features. After my feature engineering, I concluded that high cardinality is key.  In my case, Leaving high cardinality is a good way to gain the good result. In other words, I think that  the special peoples who yield revenue have the very specific categories. </p>",
      "rawMarkdown": "I've focused on how to interact the category features. After my feature engineering, I concluded that high cardinality is key.  In my case, Leaving high cardinality is a good way to gain the good result. In other words, I think that  the special peoples who yield revenue have the very specific categories. ",
      "votes": 3
    },
    {
      "id": 396249,
      "postDate": "2018-09-30T10:33:45.783Z",
      "content": "<p>Hi. I'm using simple Kfold validation and the improvement of local cv score can always translate to LB. My expericence is that mean encoding can somehow casue overfitting in you local train data, and I suggest you should use local cv and LB together as your feature selection metric from the very beginning. Or there is just something wrong in your post processing when summing up predictions :)</p>",
      "rawMarkdown": "Hi. I'm using simple Kfold validation and the improvement of local cv score can always translate to LB. My expericence is that mean encoding can somehow casue overfitting in you local train data, and I suggest you should use local cv and LB together as your feature selection metric from the very beginning. Or there is just something wrong in your post processing when summing up predictions :)",
      "votes": 3
    },
    {
      "id": 397361,
      "postDate": "2018-10-02T11:51:31.583Z",
      "content": "<p>@Youhan @dylan_chen @mezoganet @Thomas Nelson  @Corey Levinson</p>\n\n<p>Thanks a lot everybody for the emotional and technical support!!\nI managed to pass the hurdle,\nI took a blank notebook and started from scratch and from simple, checking with submissions that nothing is suspicious.\nI managed to implement some of my ideas and submit a single LGBM session based model with score of 1.4285.</p>\n\n<p>Back to work,\nyou guys are awesome!</p>",
      "rawMarkdown": "@Youhan @dylan_chen @mezoganet @Thomas Nelson  @Corey Levinson\n\nThanks a lot everybody for the emotional and technical support!!\nI managed to pass the hurdle,\nI took a blank notebook and started from scratch and from simple, checking with submissions that nothing is suspicious.\nI managed to implement some of my ideas and submit a single LGBM session based model with score of 1.4285.\n\nBack to work,\nyou guys are awesome!",
      "votes": 1,
      "replies": [
        {
          "id": 397529,
          "postDate": "2018-10-02T16:06:30.803Z",
          "content": "<p>Hi, @AmirH..</p>\n\n<p>Like you, I also use R and I had problems to get a decent submission. I started again yesterday and got 1.4331 using a session level model (Lightgbm). I didn't peform hyper parameter tuning, so I hope to increase a little bit.</p>",
          "rawMarkdown": "Hi, @AmirH..\n\nLike you, I also use R and I had problems to get a decent submission. I started again yesterday and got 1.4331 using a session level model (Lightgbm). I didn't peform hyper parameter tuning, so I hope to increase a little bit."
        },
        {
          "id": 397533,
          "postDate": "2018-10-02T16:19:05.647Z",
          "content": "<p>hi Amir , can i know what was the cv score for that 1.4285 submission ?</p>",
          "rawMarkdown": "hi Amir , can i know what was the cv score for that 1.4285 submission ?"
        },
        {
          "id": 397535,
          "postDate": "2018-10-02T16:22:23.813Z",
          "content": "<p>Hi Paulo,\nGood to hear you also got it figured out! \nLet's bomb the LB with R solutions!\nThere really isn't enough of them. </p>",
          "rawMarkdown": "Hi Paulo,\nGood to hear you also got it figured out! \nLet's bomb the LB with R solutions!\nThere really isn't enough of them. ",
          "votes": 1
        },
        {
          "id": 397536,
          "postDate": "2018-10-02T16:24:00.743Z",
          "content": "<p>Sure <a href=\"/suchith\">@suchith</a>.\nIt's 1.589  on the session level </p>",
          "rawMarkdown": "Sure @suchith.\nIt's 1.589  on the session level ",
          "votes": 2
        },
        {
          "id": 397538,
          "postDate": "2018-10-02T16:27:44.543Z",
          "content": "<p>Thanks, amir, I don't know what I am doing wrong, my cv and LB are in different directions(cv error decreased and lb error increased)</p>",
          "rawMarkdown": "Thanks, amir, I don't know what I am doing wrong, my cv and LB are in different directions(cv error decreased and lb error increased)"
        },
        {
          "id": 397543,
          "postDate": "2018-10-02T16:38:08.320Z",
          "content": "<p><a href=\"/suchith\">@suchith</a> it happens to me also with specific features, especially some time based and the whole page view and hits ratio thing, i also use 5 group kfold by visitorid for cv</p>",
          "rawMarkdown": "@suchith it happens to me also with specific features, especially some time based and the whole page view and hits ratio thing, i also use 5 group kfold by visitorid for cv"
        }
      ]
    },
    {
      "id": 396818,
      "postDate": "2018-10-01T12:34:28.910Z",
      "content": "<p>@Youhan @dylan_chen @mezoganet\nThanks for your responses.</p>\n\n<p>I still can't figure out what's wrong =(</p>\n\n<p>I duplicated in R the same features as @Olivier, everything simple,  only categorical and some time feature(day of week etc)\nTraining on session based model\nI tried my LGB and catboost on those and still get 1.459 on catboost, and 1.46 on LGBM,\nWhere @Olivier said he gets 1.44~</p>\n\n<p>Before moving forward with FE and a lot of ideas i have, i must clear this issue!!\nI have no idea what to do , i spent 10-15 submissions to try and find out why this happens, also updated LGBM to latest version to make sure it's not anything there.</p>\n\n<p>There's no R kernel that reaches 1.44 currently so i got no place to get inspiration from.</p>\n\n<p>I'm pretty sure it's something about the categories.</p>\n\n<p>attached is my importance summary,\nand also Olivier's importance summary from this kernel:</p>\n\n<p><a href=\"https://www.kaggle.com/ogrellier/teach-lightgbm-to-sum-predictions/notebook\">https://www.kaggle.com/ogrellier/teach-lightgbm-to-sum-predictions/notebook</a></p>\n\n<p>something is completely off there =/\nany ideas? </p>",
      "rawMarkdown": "@Youhan @dylan_chen @mezoganet\nThanks for your responses.\n\nI still can't figure out what's wrong =(\n\nI duplicated in R the same features as @Olivier, everything simple,  only categorical and some time feature(day of week etc)\nTraining on session based model\nI tried my LGB and catboost on those and still get 1.459 on catboost, and 1.46 on LGBM,\nWhere @Olivier said he gets 1.44~\n\nBefore moving forward with FE and a lot of ideas i have, i must clear this issue!!\nI have no idea what to do , i spent 10-15 submissions to try and find out why this happens, also updated LGBM to latest version to make sure it's not anything there.\n\nThere's no R kernel that reaches 1.44 currently so i got no place to get inspiration from.\n\nI'm pretty sure it's something about the categories.\n\nattached is my importance summary,\nand also Olivier's importance summary from this kernel:\n\nhttps://www.kaggle.com/ogrellier/teach-lightgbm-to-sum-predictions/notebook\n\n\nsomething is completely off there =/\nany ideas? \n",
      "votes": -1,
      "replies": [
        {
          "id": 396898,
          "postDate": "2018-10-01T15:05:48.860Z",
          "rawMarkdown": "",
          "votes": 3,
          "isDeleted": true
        },
        {
          "id": 396915,
          "postDate": "2018-10-01T15:35:33.560Z",
          "content": "<p>Fully agree.</p>\n\n<p>This data is so weird that nobody has really found the ´Key’, and we are around 2000 people working hard.</p>\n\n<p>@AmirH</p>\n\n<p>Be confident, we have 2 months to go ;-)</p>",
          "rawMarkdown": "Fully agree.\n\nThis data is so weird that nobody has really found the ´Key’, and we are around 2000 people working hard.\n\n@AmirH\n\nBe confident, we have 2 months to go ;-)",
          "votes": 2
        },
        {
          "id": 396935,
          "postDate": "2018-10-01T16:35:04.723Z",
          "content": "<p><a href=\"/thomasnelson\">@thomasnelson</a> are you modeling nonzero user as a Poisson, and using probability of nonzero as just an extra feature to the regression?</p>",
          "rawMarkdown": "@thomasnelson are you modeling nonzero user as a Poisson, and using probability of nonzero as just an extra feature to the regression?"
        },
        {
          "id": 396939,
          "postDate": "2018-10-01T16:45:06.023Z",
          "rawMarkdown": "",
          "votes": 3,
          "isDeleted": true
        },
        {
          "id": 396940,
          "postDate": "2018-10-01T16:48:38.257Z",
          "content": "<p><a href=\"/thomasnelson\">@thomasnelson</a> Here are some thoughts...maybe try number of nonzero transactions as Poisson, so then you can get it discrete?</p>\n\n<p>Also, to address the severe unbalance problem, I <em>highly</em> recommend reading this writeup (<a href=\"https://jeddy92.github.io/JEddy92.github.io/seguro/\">https://jeddy92.github.io/JEddy92.github.io/seguro/</a>) by Joe Eddy...he uses a sandwiching technique to downsample zero-transactions. I plan to use this for my submission...</p>",
          "rawMarkdown": "@thomasnelson Here are some thoughts...maybe try number of nonzero transactions as Poisson, so then you can get it discrete?\n\nAlso, to address the severe unbalance problem, I *highly* recommend reading this writeup (https://jeddy92.github.io/JEddy92.github.io/seguro/) by Joe Eddy...he uses a sandwiching technique to downsample zero-transactions. I plan to use this for my submission...",
          "votes": 1
        },
        {
          "id": 400566,
          "postDate": "2018-10-08T15:05:30.337Z",
          "content": "<p><a href=\"/thomasnelson\">@thomasnelson</a> have you checked tweedie regression? I am not that great in statistics so I just checked this one out and maybe this will generalize better than the others?</p>",
          "rawMarkdown": "@thomasnelson have you checked tweedie regression? I am not that great in statistics so I just checked this one out and maybe this will generalize better than the others?"
        }
      ]
    },
    {
      "id": 399437,
      "postDate": "2018-10-05T19:28:04.513Z",
      "content": "<p>@AmirH</p>\n\n<p>Being '43rd in this Competition' at the time of writing this comment seems to be more than correct ;-)</p>\n\n<p>Nice job, keep on progressing !</p>",
      "rawMarkdown": "@AmirH\n\nBeing '43rd in this Competition' at the time of writing this comment seems to be more than correct ;-)\n\nNice job, keep on progressing !\n"
    },
    {
      "id": 399259,
      "postDate": "2018-10-05T14:06:07.797Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 396322,
      "author_name": "mezoganet",
      "author_url": "",
      "post_date": "2018-09-30T13:13:43.360000",
      "content": "<p>@AmirH</p>\n\n<p>It is true that this competition is a little bit strange ! </p>\n\n<p>Here are 'my' best params I normally use on this file : </p>\n\n<p>params = {'objective': 'reg:linear',\n          'eval_metric': 'rmse',\n          'eta': 0.001,\n          'max_depth': 8,\n          'subsample': 0.7,\n          'colsample_bytree': 0.8,\n          'alpha':0.001,\n          'num_leaves' : 63,\n          'random_state': 42,\n          'silent': True,\n          }</p>\n\n<p>Don't forget early_stopping : I usually use a low 20 rounds compared to a lot of kernels you can find. The higher the risk of overfitting is possible</p>\n\n<p>'<strong>subsample</strong>': 0.7 is the number of random rows you use and '<strong>colsample_bytree</strong>': 0.8 the same for colums to use. This add randomness to your evaluation. 0.9 is  according to me most of the times too high.</p>\n\n<p>There is no standard rule, it depends on your -<strong><em>own</em></strong>- file. Just play and try, and don't forget to keep track of your Local and LB scores.</p>\n\n<p>Good luck !</p>",
      "votes": 6,
      "replies": [
        {
          "id": 399336,
          "author_name": "Misha Lisovyi",
          "author_url": "",
          "post_date": "2018-10-05T16:17:22.500000",
          "content": "<p>How did you choose those LGBM parameters? In particular, the very low learning rate is interesting to me. In combination with low early stopping, are you sure that allows the training to climb out of shallow local minima?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 399433,
          "author_name": "mezoganet",
          "author_url": "",
          "post_date": "2018-10-05T19:16:40.747000",
          "content": "<p>@Misha Lisovyi</p>\n\n<p>A very low learning rate (lr) is ok when you trust your model... <strong>BUT</strong> don't forget to lower your 'early_stopping' 20/50 is a maximum when you play with a low lr or you will easily overfit.</p>\n\n<p>The problem is that the model will train for a long time. The solution to reduce time for training/predicting  is using GPU as a device in LGB params : 'device' : 'GPU'</p>\n\n<p>HTH</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 396811,
      "author_name": "Youhan Lee",
      "author_url": "",
      "post_date": "2018-10-01T12:12:57.353000",
      "content": "<p>I've focused on how to interact the category features. After my feature engineering, I concluded that high cardinality is key.  In my case, Leaving high cardinality is a good way to gain the good result. In other words, I think that  the special peoples who yield revenue have the very specific categories. </p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 396249,
      "author_name": "fortune cookie",
      "author_url": "",
      "post_date": "2018-09-30T10:33:45.783000",
      "content": "<p>Hi. I'm using simple Kfold validation and the improvement of local cv score can always translate to LB. My expericence is that mean encoding can somehow casue overfitting in you local train data, and I suggest you should use local cv and LB together as your feature selection metric from the very beginning. Or there is just something wrong in your post processing when summing up predictions :)</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 397361,
      "author_name": "AmirH",
      "author_url": "",
      "post_date": "2018-10-02T11:51:31.583000",
      "content": "<p>@Youhan @dylan_chen @mezoganet @Thomas Nelson  @Corey Levinson</p>\n\n<p>Thanks a lot everybody for the emotional and technical support!!\nI managed to pass the hurdle,\nI took a blank notebook and started from scratch and from simple, checking with submissions that nothing is suspicious.\nI managed to implement some of my ideas and submit a single LGBM session based model with score of 1.4285.</p>\n\n<p>Back to work,\nyou guys are awesome!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 397529,
          "author_name": "Paulo Felipe",
          "author_url": "",
          "post_date": "2018-10-02T16:06:30.803000",
          "content": "<p>Hi, @AmirH..</p>\n\n<p>Like you, I also use R and I had problems to get a decent submission. I started again yesterday and got 1.4331 using a session level model (Lightgbm). I didn't peform hyper parameter tuning, so I hope to increase a little bit.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 397533,
          "author_name": "redshellspy",
          "author_url": "",
          "post_date": "2018-10-02T16:19:05.647000",
          "content": "<p>hi Amir , can i know what was the cv score for that 1.4285 submission ?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 397535,
          "author_name": "AmirH",
          "author_url": "",
          "post_date": "2018-10-02T16:22:23.813000",
          "content": "<p>Hi Paulo,\nGood to hear you also got it figured out! \nLet's bomb the LB with R solutions!\nThere really isn't enough of them. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 397536,
          "author_name": "AmirH",
          "author_url": "",
          "post_date": "2018-10-02T16:24:00.743000",
          "content": "<p>Sure <a href=\"/suchith\">@suchith</a>.\nIt's 1.589  on the session level </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 397538,
          "author_name": "redshellspy",
          "author_url": "",
          "post_date": "2018-10-02T16:27:44.543000",
          "content": "<p>Thanks, amir, I don't know what I am doing wrong, my cv and LB are in different directions(cv error decreased and lb error increased)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 397543,
          "author_name": "AmirH",
          "author_url": "",
          "post_date": "2018-10-02T16:38:08.320000",
          "content": "<p><a href=\"/suchith\">@suchith</a> it happens to me also with specific features, especially some time based and the whole page view and hits ratio thing, i also use 5 group kfold by visitorid for cv</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 396818,
      "author_name": "AmirH",
      "author_url": "",
      "post_date": "2018-10-01T12:34:28.910000",
      "content": "<p>@Youhan @dylan_chen @mezoganet\nThanks for your responses.</p>\n\n<p>I still can't figure out what's wrong =(</p>\n\n<p>I duplicated in R the same features as @Olivier, everything simple,  only categorical and some time feature(day of week etc)\nTraining on session based model\nI tried my LGB and catboost on those and still get 1.459 on catboost, and 1.46 on LGBM,\nWhere @Olivier said he gets 1.44~</p>\n\n<p>Before moving forward with FE and a lot of ideas i have, i must clear this issue!!\nI have no idea what to do , i spent 10-15 submissions to try and find out why this happens, also updated LGBM to latest version to make sure it's not anything there.</p>\n\n<p>There's no R kernel that reaches 1.44 currently so i got no place to get inspiration from.</p>\n\n<p>I'm pretty sure it's something about the categories.</p>\n\n<p>attached is my importance summary,\nand also Olivier's importance summary from this kernel:</p>\n\n<p><a href=\"https://www.kaggle.com/ogrellier/teach-lightgbm-to-sum-predictions/notebook\">https://www.kaggle.com/ogrellier/teach-lightgbm-to-sum-predictions/notebook</a></p>\n\n<p>something is completely off there =/\nany ideas? </p>",
      "votes": -1,
      "replies": [
        {
          "id": 396898,
          "author_name": "",
          "author_url": "",
          "post_date": "2018-10-01T15:05:48.860000",
          "content": "",
          "votes": 3,
          "replies": []
        },
        {
          "id": 396915,
          "author_name": "mezoganet",
          "author_url": "",
          "post_date": "2018-10-01T15:35:33.560000",
          "content": "<p>Fully agree.</p>\n\n<p>This data is so weird that nobody has really found the ´Key’, and we are around 2000 people working hard.</p>\n\n<p>@AmirH</p>\n\n<p>Be confident, we have 2 months to go ;-)</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 396935,
          "author_name": "CoreyJamesLevinson",
          "author_url": "",
          "post_date": "2018-10-01T16:35:04.723000",
          "content": "<p><a href=\"/thomasnelson\">@thomasnelson</a> are you modeling nonzero user as a Poisson, and using probability of nonzero as just an extra feature to the regression?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 396939,
          "author_name": "",
          "author_url": "",
          "post_date": "2018-10-01T16:45:06.023000",
          "content": "",
          "votes": 3,
          "replies": []
        },
        {
          "id": 396940,
          "author_name": "CoreyJamesLevinson",
          "author_url": "",
          "post_date": "2018-10-01T16:48:38.257000",
          "content": "<p><a href=\"/thomasnelson\">@thomasnelson</a> Here are some thoughts...maybe try number of nonzero transactions as Poisson, so then you can get it discrete?</p>\n\n<p>Also, to address the severe unbalance problem, I <em>highly</em> recommend reading this writeup (<a href=\"https://jeddy92.github.io/JEddy92.github.io/seguro/\">https://jeddy92.github.io/JEddy92.github.io/seguro/</a>) by Joe Eddy...he uses a sandwiching technique to downsample zero-transactions. I plan to use this for my submission...</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 400566,
          "author_name": "rafamacalaba",
          "author_url": "",
          "post_date": "2018-10-08T15:05:30.337000",
          "content": "<p><a href=\"/thomasnelson\">@thomasnelson</a> have you checked tweedie regression? I am not that great in statistics so I just checked this one out and maybe this will generalize better than the others?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 399437,
      "author_name": "mezoganet",
      "author_url": "",
      "post_date": "2018-10-05T19:28:04.513000",
      "content": "<p>@AmirH</p>\n\n<p>Being '43rd in this Competition' at the time of writing this comment seems to be more than correct ;-)</p>\n\n<p>Nice job, keep on progressing !</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 399259,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-10-05T14:06:07.797000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "396235": "Hi Kagglers,\n\nI'm getting really frustrated with this competition.\nSeems like anything I do that generates better CV, gets worse LB.\nMy position is pretty bad.\n\nI started out using time based validation with 3 last months as validation set.\nI had some 1.44~ submissions using this validation.\n\nIt's easier for me to use 5 fold validation as i can also use these folds for mean encodings, OOF stacking, averaged CV score , implementing oof binary classification to use in model etc.\n\nAs I don't see any reason not to use 5 fold CV here, i generated 5 Folds by group of fullVisitorId. (all rows of a specific fullvisitorId are always in the same fold).\nSince doing that, anything i seem to be doing , without any high risk things such as mean encodings etc. I get scores of 1.45-1.47\neven using only simple features such as:\n\n\n\n\"channelGrouping\", \"visitNumber\", \"browser\", \"operatingSystem\", \"isMobile\", \"deviceCategory\", \"continent\", \"subContinent\", \"country\", \"region\", \"metro\", \"city\", \"networkDomain\", \"hits\", \"pageviews\", \"newVisits\", \"bounces\", \"source\", \"medium\", \"keyword\", \"isTrueDirect\", \"referralPath\", \"VisitMonth\", \"VisitDay\", \"VisitWeekDay\", \"VisitHour\", \"CountVisitorVisits\", \"Location\", \"IsMulti\", \"Maxhits\", \"Meanhits\", \"Medianhits\", \"Maxpageviews\", \"Meanpageviews\", \"Medianpageviews\", \"DaysActive\" \n\n\n (categories are label encoded)\nwith LGBM with parameters:\n\nlist(objective = \"regression\",\n                          metric = \"RMSE\",\n                          learning_rate= 0.03,\n                          num_leaves= 40, #16\n                          #max_depth= 12,    #3\n                          #max_bin= 255,\n                          subsample= 0.9,\n                          subsample_freq= 1,\n                          colsample_bytree=0.9)\n\n\n\nI use lgbm's lgb.cv with my 5folds  and then retrain on entire data with best.iteration.\n \nAny suggestions?\nI'm really frustrated.\n\nI don't like forking and using kernels much, I also use R\nI saw @Olivier using 5 fold validation with very simple model and getting better scores.\nI tried session level, user level.. I just don't understand!!\nDoes anyone else experience the same?\n\n\n- What CV method are you using?\n\n- How does one do mean encoding \\ OOF predictions when using 1 set of train and 1 set of validation, without having folds?\n\n\nThanks!\nAmir.\n\n",
    "396322": "@AmirH\n\nIt is true that this competition is a little bit strange ! \n\nHere are 'my' best params I normally use on this file : \n\nparams = {'objective': 'reg:linear',\n          'eval_metric': 'rmse',\n          'eta': 0.001,\n          'max_depth': 8,\n          'subsample': 0.7,\n          'colsample_bytree': 0.8,\n          'alpha':0.001,\n          'num_leaves' : 63,\n          'random_state': 42,\n          'silent': True,\n          }\n\nDon't forget early_stopping : I usually use a low 20 rounds compared to a lot of kernels you can find. The higher the risk of overfitting is possible\n\n'**subsample**': 0.7 is the number of random rows you use and '**colsample_bytree**': 0.8 the same for colums to use. This add randomness to your evaluation. 0.9 is  according to me most of the times too high.\n\nThere is no standard rule, it depends on your -***own***- file. Just play and try, and don't forget to keep track of your Local and LB scores.\n\nGood luck !",
    "396811": "I've focused on how to interact the category features. After my feature engineering, I concluded that high cardinality is key.  In my case, Leaving high cardinality is a good way to gain the good result. In other words, I think that  the special peoples who yield revenue have the very specific categories. ",
    "396249": "Hi. I'm using simple Kfold validation and the improvement of local cv score can always translate to LB. My expericence is that mean encoding can somehow casue overfitting in you local train data, and I suggest you should use local cv and LB together as your feature selection metric from the very beginning. Or there is just something wrong in your post processing when summing up predictions :)",
    "397361": "@Youhan @dylan_chen @mezoganet @Thomas Nelson  @Corey Levinson\n\nThanks a lot everybody for the emotional and technical support!!\nI managed to pass the hurdle,\nI took a blank notebook and started from scratch and from simple, checking with submissions that nothing is suspicious.\nI managed to implement some of my ideas and submit a single LGBM session based model with score of 1.4285.\n\nBack to work,\nyou guys are awesome!",
    "396818": "@Youhan @dylan_chen @mezoganet\nThanks for your responses.\n\nI still can't figure out what's wrong =(\n\nI duplicated in R the same features as @Olivier, everything simple,  only categorical and some time feature(day of week etc)\nTraining on session based model\nI tried my LGB and catboost on those and still get 1.459 on catboost, and 1.46 on LGBM,\nWhere @Olivier said he gets 1.44~\n\nBefore moving forward with FE and a lot of ideas i have, i must clear this issue!!\nI have no idea what to do , i spent 10-15 submissions to try and find out why this happens, also updated LGBM to latest version to make sure it's not anything there.\n\nThere's no R kernel that reaches 1.44 currently so i got no place to get inspiration from.\n\nI'm pretty sure it's something about the categories.\n\nattached is my importance summary,\nand also Olivier's importance summary from this kernel:\n\nhttps://www.kaggle.com/ogrellier/teach-lightgbm-to-sum-predictions/notebook\n\n\nsomething is completely off there =/\nany ideas? \n",
    "399437": "@AmirH\n\nBeing '43rd in this Competition' at the time of writing this comment seems to be more than correct ;-)\n\nNice job, keep on progressing !\n",
    "399259": ""
  }
}