{
  "id": 56333,
  "title": "Hints on 13th place solution.. and finally Grandmaster!",
  "url": "/competitions/talkingdata-adtracking-fraud-detection/writeups/alberto-danese-hints-on-13th-place-solution-and-fi",
  "author_name": "",
  "post_date": "2018-05-08T17:48:43.595154700Z",
  "votes": 43,
  "comment_count": 14,
  "views": 0,
  "content": "<p>Hi everyone! First of all, congratulations to the winners, and thanks to all of those who shared ideas or kernels in the forum.\nThis competition has been very challenging, considering the amount of data involved and the tricky time-variant problem.</p>\n\n<p>I'll just give some hints on my solution, besides what is already described in many posts and kernels:</p>\n\n<ol>\n<li>Use test supplement: it is crucial, as it gives extra data to calculate next click features;</li>\n<li>Focus on a clean and correct approach first, then on CV / local validation (time-variant problem + extremely imbalanced dataset = impossible to have a 100% reliable validation, at least for me), finally on the public LB (clearly too small and not representative of the private LB) </li>\n<li>Careful with next click feature: a click at 14.30 in the test set, for instance, has a maximum next click at 90 minutes (using test supplement), in train it could be over a day. I ended up using three 24 hours time frames and calculating the next click within this time frame, otherwise there would be a clear difference between training and test features.</li>\n</ol>\n\n<p>Other notes:</p>\n\n<ul>\n<li>I used R + xgboost and lightgbm (and heavy use of data.table for grouping, counting, shifting etc), training on days 7-8-9 in some models and on 8-9 in others;</li>\n<li>Validation setup: random 10mln rows in validation, 25mln in train plus all the \"ones\" not present in validation (remember AUC cares only about order) - repeat with different samples</li>\n<li>Memory: 32GB of ram and 60GB of swap (never used swap in previous kaggle competitions). </li>\n<li>Other features: some \"previous day\" counts and ratios proved to be not particularly effective, but useful to create diverse models.</li>\n</ul>\n\n<p>At the end of the day, 6 competitions, 5 gold medals, 4 solo gold medals, 1 prize in private masters-only competition, it's time for a break! But I always come back to Kaggle sooner than expected.\nIt is an addicition with no effective therapy and a great way to learn, deal with real world problems and keep up to date!</p>",
  "messages": [
    {
      "id": "325675",
      "postDate": "05/08/2018 17:48:43",
      "content": "<p>Hi everyone! First of all, congratulations to the winners, and thanks to all of those who shared ideas or kernels in the forum.\nThis competition has been very challenging, considering the amount of data involved and the tricky time-variant problem.</p>\n\n<p>I'll just give some hints on my solution, besides what is already described in many posts and kernels:</p>\n\n<ol>\n<li>Use test supplement: it is crucial, as it gives extra data to calculate next click features;</li>\n<li>Focus on a clean and correct approach first, then on CV / local validation (time-variant problem + extremely imbalanced dataset = impossible to have a 100% reliable validation, at least for me), finally on the public LB (clearly too small and not representative of the private LB) </li>\n<li>Careful with next click feature: a click at 14.30 in the test set, for instance, has a maximum next click at 90 minutes (using test supplement), in train it could be over a day. I ended up using three 24 hours time frames and calculating the next click within this time frame, otherwise there would be a clear difference between training and test features.</li>\n</ol>\n\n<p>Other notes:</p>\n\n<ul>\n<li>I used R + xgboost and lightgbm (and heavy use of data.table for grouping, counting, shifting etc), training on days 7-8-9 in some models and on 8-9 in others;</li>\n<li>Validation setup: random 10mln rows in validation, 25mln in train plus all the \"ones\" not present in validation (remember AUC cares only about order) - repeat with different samples</li>\n<li>Memory: 32GB of ram and 60GB of swap (never used swap in previous kaggle competitions). </li>\n<li>Other features: some \"previous day\" counts and ratios proved to be not particularly effective, but useful to create diverse models.</li>\n</ul>\n\n<p>At the end of the day, 6 competitions, 5 gold medals, 4 solo gold medals, 1 prize in private masters-only competition, it's time for a break! But I always come back to Kaggle sooner than expected.\nIt is an addicition with no effective therapy and a great way to learn, deal with real world problems and keep up to date!</p>",
      "rawMarkdown": "Hi everyone! First of all, congratulations to the winners, and thanks to all of those who shared ideas or kernels in the forum.\nThis competition has been very challenging, considering the amount of data involved and the tricky time-variant problem.\n\nI'll just give some hints on my solution, besides what is already described in many posts and kernels:\n\n 1. Use test supplement: it is crucial, as it gives extra data to calculate next click features;\n 2. Focus on a clean and correct approach first, then on CV / local validation (time-variant problem + extremely imbalanced dataset = impossible to have a 100% reliable validation, at least for me), finally on the public LB (clearly too small and not representative of the private LB) \n 3. Careful with next click feature: a click at 14.30 in the test set, for instance, has a maximum next click at 90 minutes (using test supplement), in train it could be over a day. I ended up using three 24 hours time frames and calculating the next click within this time frame, otherwise there would be a clear difference between training and test features.\n\nOther notes:\n\n - I used R + xgboost and lightgbm (and heavy use of data.table for grouping, counting, shifting etc), training on days 7-8-9 in some models and on 8-9 in others;\n - Validation setup: random 10mln rows in validation, 25mln in train plus all the \"ones\" not present in validation (remember AUC cares only about order) - repeat with different samples\n - Memory: 32GB of ram and 60GB of swap (never used swap in previous kaggle competitions). \n - Other features: some \"previous day\" counts and ratios proved to be not particularly effective, but useful to create diverse models.\n\nAt the end of the day, 6 competitions, 5 gold medals, 4 solo gold medals, 1 prize in private masters-only competition, it's time for a break! But I always come back to Kaggle sooner than expected.\nIt is an addicition with no effective therapy and a great way to learn, deal with real world problems and keep up to date!",
      "votes": null
    },
    {
      "id": "325686",
      "postDate": "05/08/2018 18:00:20",
      "content": "<p>Excellent work Alberto and congratulation. Your Kaggle journey is truly inspiring. </p>",
      "rawMarkdown": "Excellent work Alberto and congratulation. Your Kaggle journey is truly inspiring.",
      "votes": null
    },
    {
      "id": "325700",
      "postDate": "05/08/2018 18:35:11",
      "content": "<p>Contratulations! </p>\n\n<p>You've reached your destiny while I am at the beggining of this route - hopefully some day I will join you at the top ;)</p>",
      "rawMarkdown": "Contratulations! \n\nYou've reached your destiny while I am at the beggining of this route - hopefully some day I will join you at the top ;)",
      "votes": null
    },
    {
      "id": "325707",
      "postDate": "05/08/2018 19:00:19",
      "content": "<p>Great Job!\nCongratulations.</p>",
      "rawMarkdown": "Great Job!\nCongratulations.",
      "votes": null
    },
    {
      "id": "325808",
      "postDate": "05/08/2018 22:03:14",
      "content": "<p>Congrats! Well deserved!!</p>",
      "rawMarkdown": "Congrats! Well deserved!!",
      "votes": null
    },
    {
      "id": "325845",
      "postDate": "05/09/2018 00:39:32",
      "content": "<p>Contratulations!</p>",
      "rawMarkdown": "Contratulations!",
      "votes": null
    },
    {
      "id": "325887",
      "postDate": "05/09/2018 02:32:30",
      "content": "<p>Congrats! </p>",
      "rawMarkdown": "Congrats!",
      "votes": null
    },
    {
      "id": "325973",
      "postDate": "05/09/2018 06:22:44",
      "content": "<p>Congrats on becoming grand master and one the gold.  I saw you surge on the LB and I was afraid of you passing me.  I hope you'll compete again! </p>\n\n<p>&gt; I ended up using three 24 hours time frames and calculating the next click within this time frame, </p>\n\n<p>I did it too.  Actually, I think Talking Data said they were looking for a match within 24 hours of download.</p>",
      "rawMarkdown": "Congrats on becoming grand master and one the gold.  I saw you surge on the LB and I was afraid of you passing me.  I hope you'll compete again! \n\n&gt; I ended up using three 24 hours time frames and calculating the next click within this time frame, \n\nI did it too.  Actually, I think Talking Data said they were looking for a match within 24 hours of download.",
      "votes": null
    },
    {
      "id": "326026",
      "postDate": "05/09/2018 07:05:42",
      "content": "<p>Well done and nice achievement to become grand master... Being a noob, I see how difficult this is! All the best to you Alberto Danese</p>",
      "rawMarkdown": "Well done and nice achievement to become grand master... Being a noob, I see how difficult this is! All the best to you Alberto Danese",
      "votes": null
    },
    {
      "id": "326170",
      "postDate": "05/09/2018 11:47:37",
      "content": "<p>Ready for homework Maestro!! Opps sorry volevo dire Grande Maestro ... ;)\nI will study it carefully!!</p>",
      "rawMarkdown": "Ready for homework Maestro!! Opps sorry volevo dire Grande Maestro ... ;)\nI will study it carefully!!",
      "votes": null
    },
    {
      "id": "326381",
      "postDate": "05/09/2018 16:08:31",
      "content": "<blockquote>\n  <p>I hope you'll compete again! </p>\n</blockquote>\n\n<p>Obviously, there is really no doubt about it!</p>\n\n<p>Congratulations on your achievement CPMP, you are almost a GM ;)</p>",
      "rawMarkdown": "&gt;  I hope you'll compete again! \n\nObviously, there is really no doubt about it!\n\nCongratulations on your achievement CPMP, you are almost a GM ;)",
      "votes": null
    },
    {
      "id": "326384",
      "postDate": "05/09/2018 16:11:45",
      "content": "<p>Thanks to everyone for the messages! :)</p>\n\n<p>Taking a look at other kagglers' solutions, mine feels simpler... but I guess implementation plays a role</p>",
      "rawMarkdown": "Thanks to everyone for the messages! :)\n\nTaking a look at other kagglers' solutions, mine feels simpler... but I guess implementation plays a role",
      "votes": null
    },
    {
      "id": "326481",
      "postDate": "05/09/2018 19:52:35",
      "content": "<p>Congrats! The idea of using the test supplement is truly what I missed. Thank you for sharing this!</p>",
      "rawMarkdown": "Congrats! The idea of using the test supplement is truly what I missed. Thank you for sharing this!",
      "votes": null
    },
    {
      "id": "326736",
      "postDate": "05/10/2018 08:45:17",
      "content": "<p>Congratulazioni!!!</p>",
      "rawMarkdown": "Congratulazioni!!!",
      "votes": null
    },
    {
      "id": "485022",
      "postDate": "03/06/2019 20:01:37",
      "content": "<p>What exactly is test supplement?</p>",
      "rawMarkdown": "What exactly is test supplement?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 325686,
      "author_name": "pranav84",
      "author_url": "",
      "post_date": "05/08/2018 18:00:20",
      "content": "<p>Excellent work Alberto and congratulation. Your Kaggle journey is truly inspiring. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 325700,
      "author_name": "meykds",
      "author_url": "",
      "post_date": "05/08/2018 18:35:11",
      "content": "<p>Contratulations! </p>\n\n<p>You've reached your destiny while I am at the beggining of this route - hopefully some day I will join you at the top ;)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 325707,
      "author_name": "a45632",
      "author_url": "",
      "post_date": "05/08/2018 19:00:19",
      "content": "<p>Great Job!\nCongratulations.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 325808,
      "author_name": "inversion",
      "author_url": "",
      "post_date": "05/08/2018 22:03:14",
      "content": "<p>Congrats! Well deserved!!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 325845,
      "author_name": "yyll008",
      "author_url": "",
      "post_date": "05/09/2018 00:39:32",
      "content": "<p>Contratulations!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 325887,
      "author_name": "alexyung757",
      "author_url": "",
      "post_date": "05/09/2018 02:32:30",
      "content": "<p>Congrats! </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 325973,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "05/09/2018 06:22:44",
      "content": "<p>Congrats on becoming grand master and one the gold.  I saw you surge on the LB and I was afraid of you passing me.  I hope you'll compete again! </p>\n\n<p>&gt; I ended up using three 24 hours time frames and calculating the next click within this time frame, </p>\n\n<p>I did it too.  Actually, I think Talking Data said they were looking for a match within 24 hours of download.</p>",
      "votes": null,
      "replies": [
        {
          "id": 326381,
          "author_name": "albedan",
          "author_url": "",
          "post_date": "05/09/2018 16:08:31",
          "content": "<blockquote>\n  <p>I hope you'll compete again! </p>\n</blockquote>\n\n<p>Obviously, there is really no doubt about it!</p>\n\n<p>Congratulations on your achievement CPMP, you are almost a GM ;)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 326026,
      "author_name": "ericbenhamou",
      "author_url": "",
      "post_date": "05/09/2018 07:05:42",
      "content": "<p>Well done and nice achievement to become grand master... Being a noob, I see how difficult this is! All the best to you Alberto Danese</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 326170,
      "author_name": "pietromarinelli",
      "author_url": "",
      "post_date": "05/09/2018 11:47:37",
      "content": "<p>Ready for homework Maestro!! Opps sorry volevo dire Grande Maestro ... ;)\nI will study it carefully!!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 326384,
      "author_name": "albedan",
      "author_url": "",
      "post_date": "05/09/2018 16:11:45",
      "content": "<p>Thanks to everyone for the messages! :)</p>\n\n<p>Taking a look at other kagglers' solutions, mine feels simpler... but I guess implementation plays a role</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 326481,
      "author_name": "kownse",
      "author_url": "",
      "post_date": "05/09/2018 19:52:35",
      "content": "<p>Congrats! The idea of using the test supplement is truly what I missed. Thank you for sharing this!</p>",
      "votes": null,
      "replies": [
        {
          "id": 485022,
          "author_name": "alishanmustafa09",
          "author_url": "",
          "post_date": "03/06/2019 20:01:37",
          "content": "<p>What exactly is test supplement?</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 326736,
      "author_name": "steubk",
      "author_url": "",
      "post_date": "05/10/2018 08:45:17",
      "content": "<p>Congratulazioni!!!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "325675": "Hi everyone! First of all, congratulations to the winners, and thanks to all of those who shared ideas or kernels in the forum.\nThis competition has been very challenging, considering the amount of data involved and the tricky time-variant problem.\n\nI'll just give some hints on my solution, besides what is already described in many posts and kernels:\n\n 1. Use test supplement: it is crucial, as it gives extra data to calculate next click features;\n 2. Focus on a clean and correct approach first, then on CV / local validation (time-variant problem + extremely imbalanced dataset = impossible to have a 100% reliable validation, at least for me), finally on the public LB (clearly too small and not representative of the private LB) \n 3. Careful with next click feature: a click at 14.30 in the test set, for instance, has a maximum next click at 90 minutes (using test supplement), in train it could be over a day. I ended up using three 24 hours time frames and calculating the next click within this time frame, otherwise there would be a clear difference between training and test features.\n\nOther notes:\n\n - I used R + xgboost and lightgbm (and heavy use of data.table for grouping, counting, shifting etc), training on days 7-8-9 in some models and on 8-9 in others;\n - Validation setup: random 10mln rows in validation, 25mln in train plus all the \"ones\" not present in validation (remember AUC cares only about order) - repeat with different samples\n - Memory: 32GB of ram and 60GB of swap (never used swap in previous kaggle competitions). \n - Other features: some \"previous day\" counts and ratios proved to be not particularly effective, but useful to create diverse models.\n\nAt the end of the day, 6 competitions, 5 gold medals, 4 solo gold medals, 1 prize in private masters-only competition, it's time for a break! But I always come back to Kaggle sooner than expected.\nIt is an addicition with no effective therapy and a great way to learn, deal with real world problems and keep up to date!",
    "325686": "Excellent work Alberto and congratulation. Your Kaggle journey is truly inspiring.",
    "325700": "Contratulations! \n\nYou've reached your destiny while I am at the beggining of this route - hopefully some day I will join you at the top ;)",
    "325707": "Great Job!\nCongratulations.",
    "325808": "Congrats! Well deserved!!",
    "325845": "Contratulations!",
    "325887": "Congrats!",
    "325973": "Congrats on becoming grand master and one the gold.  I saw you surge on the LB and I was afraid of you passing me.  I hope you'll compete again! \n\n&gt; I ended up using three 24 hours time frames and calculating the next click within this time frame, \n\nI did it too.  Actually, I think Talking Data said they were looking for a match within 24 hours of download.",
    "326026": "Well done and nice achievement to become grand master... Being a noob, I see how difficult this is! All the best to you Alberto Danese",
    "326170": "Ready for homework Maestro!! Opps sorry volevo dire Grande Maestro ... ;)\nI will study it carefully!!",
    "326381": "&gt;  I hope you'll compete again! \n\nObviously, there is really no doubt about it!\n\nCongratulations on your achievement CPMP, you are almost a GM ;)",
    "326384": "Thanks to everyone for the messages! :)\n\nTaking a look at other kagglers' solutions, mine feels simpler... but I guess implementation plays a role",
    "326481": "Congrats! The idea of using the test supplement is truly what I missed. Thank you for sharing this!",
    "326736": "Congratulazioni!!!",
    "485022": "What exactly is test supplement?"
  },
  "source": "meta"
}