{
  "id": 9756,
  "title": "We will post the winning solution here",
  "url": "/competitions/acquire-valued-shoppers-challenge/writeups/marios-gert-we-will-post-the-winning-solution-here",
  "author_name": "",
  "post_date": "2014-07-15T06:47:16.757Z",
  "votes": 40,
  "comment_count": 16,
  "views": 11940,
  "content": "<p>Hi everyone!</p>\n<p>What a great feeling to finally get the 1st prize (as well as the Master's status that was our target in this one).</p>\n<p>I would like to thank kaggle for the wonderful competitions, and my team mate Gert for his valiant effort and wit! Also congrats to the rest of the teams that played fairly (and thank you for not beating us as there was nothing to improve for quite some time!)</p>\n<p>We will wait a couple of days before posting our solution in order to contact with Kaggle first (forgive us, it is the first time!)</p>\n<p>Generally speaking, what was really important in this one was to find a way to cross validate(1st problem!) and retain features (or interactions of them ) and then again there was the big difference between the offers in the training and test set (2nd problem!).</p>\n<p>For the first one we generally used a 1-vs-rest offers' approach to test the AUC&nbsp;and sometimes even derivatives of that. For the second (problem) we tried to maximize the with-in offers' auc (how well the offers score individually irrespective of the rest) and the total AUC&nbsp;(e.g. how the different offers blend together) as separate objectives.</p>\n<p>We used 3 (conceptually) different approaches (and some other minor blends):</p>\n<p>1. Train with similar offers <br>2. Train with whether the customer would have bought the product anyway<br>3. Assume that some features work for all offers in the same way (like: if you bought the product before, that increases the probability of becoming/staying a repeater)</p>\n<p>More coming soon...</p>",
  "messages": [
    {
      "id": "50542",
      "postDate": "07/15/2014 06:47:16",
      "content": "<p>Hi everyone!</p>\n<p>What a great feeling to finally get the 1st prize (as well as the Master's status that was our target in this one).</p>\n<p>I would like to thank kaggle for the wonderful competitions, and my team mate Gert for his valiant effort and wit! Also congrats to the rest of the teams that played fairly (and thank you for not beating us as there was nothing to improve for quite some time!)</p>\n<p>We will wait a couple of days before posting our solution in order to contact with Kaggle first (forgive us, it is the first time!)</p>\n<p>Generally speaking, what was really important in this one was to find a way to cross validate(1st problem!) and retain features (or interactions of them ) and then again there was the big difference between the offers in the training and test set (2nd problem!).</p>\n<p>For the first one we generally used a 1-vs-rest offers' approach to test the AUC&nbsp;and sometimes even derivatives of that. For the second (problem) we tried to maximize the with-in offers' auc (how well the offers score individually irrespective of the rest) and the total AUC&nbsp;(e.g. how the different offers blend together) as separate objectives.</p>\n<p>We used 3 (conceptually) different approaches (and some other minor blends):</p>\n<p>1. Train with similar offers <br>2. Train with whether the customer would have bought the product anyway<br>3. Assume that some features work for all offers in the same way (like: if you bought the product before, that increases the probability of becoming/staying a repeater)</p>\n<p>More coming soon...</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "50612",
      "postDate": "07/15/2014 21:14:39",
      "content": "<p>Congrats! Can't wait to see your solution to this problem, esp. the second problem.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "50750",
      "postDate": "07/17/2014 04:43:28",
      "content": "<p>Congrats KazAnova and thumbs up for the great job.</p>\n<p>I look forward to read more about details of your approaches and learn from the&nbsp;experience you have gained from this competition.</p>\n<p>All the best.</p>\n<p>Ashkan.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "50768",
      "postDate": "07/17/2014 12:38:38",
      "content": "<p>Really congratulations, you have done a great job, given the amount of data to be processed and the theme relating to the behavior of the consumer, I really hope to have some details on the method used and maybe even see some of the code or the model ... in the end I hope to have the opportunity to collaborate in the future.</p>\n<p>Massimo</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "50772",
      "postDate": "07/17/2014 13:09:30",
      "content": "<p>Hi guys, thanks for you kind words. Don't worry, we will explain what we did once we sort out the competition output requirements. It will help us to structure our thought-process as well! About the size of the data what really helped was to make a separate .csv file for each customer and put all their transactions in it. That way we could manipulate it at will. I will post a code for that, although it was really straight forward since the file was sorted by customer and date. All you had to do was:</p>\n<p>1) open a reader,</p>\n<p>2) stream each line</p>\n<p>3) paste the new line in a file (named as customer_id.csv) for as long as the customer was the same.</p>\n<p>and 4) switch to new file once the customer is different and so on.</p>\n<p>That way you have kind of done the indexing yourself and it is very easy to aggregate a file with 200-300 lines of transactions!</p>\n<p>:)</p>\n\n<p>I don't think I used more than 1 GB of Ram &nbsp;to create my training and test set.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "51581",
      "postDate": "08/04/2014 05:20:18",
      "content": "<p>Hi KazAnova,</p>\n<p>Many congrats for your win.</p>\n<p>Can you please explain what do you mean by similar offers? Is it on the basis of category or offer value?</p>\n\n<p>Then you said, &quot;I don't think I used more than 1 GB of Ram &nbsp;to create my training and test set.&quot;&nbsp;These sets are not the individual customer_id.csv files. Am I right?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "51592",
      "postDate": "08/04/2014 09:18:42",
      "content": "<p>[quote=Trisco7;51581]</p>\n<p>Hi KazAnova,</p>\n<p>Many congrats for your win.</p>\n<p>[/quote]</p>\n<p>Thx :)</p>\n<p>[quote=Trisco7;51581]</p>\n<p>Hi KazAnova,</p>\n<p>Can you please explain what do you mean by similar offers? Is it on the basis of category or offer value?</p>\n<p>[/quote]</p>\n<p>The initial idea about this was to&nbsp;create clusters of offers that either look like each other feature-wise (e.g. unsupervised learning ) or conceptually-wise , because they share same category, same popularity, they were listed together in the offer.csv(!) etc and train on these.</p>\n<p>However it did not work very well.</p>\n<p>At the end, we (mostly Gert) created unsupervised features that (I speculate) approximate that and dropped them into his model.</p>\n<p>[quote=Trisco7;51581]</p>\n<p>Hi KazAnova,</p>\n<p>Then you said, &quot;I don't think I used more than 1 GB of Ram to create my training and test set.&quot; These sets are not the individual customer_id.csv files. Am I right?</p>\n<p>[/quote]</p>\n<p>Both Gert and me, we created different sets. Here I was referring to the set I created which is a mixture of aggregate measures&nbsp;that map the relationship of the customer with the item (e.g how many times the customer bought from the same category in the last 30,60,90,120,150,180,360 days in the past) - similar to what Triskelion did.- as well as features that show how good the customer is in general (how many visits he's made, from how many different&nbsp;distinct&nbsp;categories he's bought from-e.g. cardinality measures)</p>\n<p>Generally, we are still waiting to finalize things with kaggle and also see how much we are allowed to share with you guys. We haven't forgotten about you though :)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "51593",
      "postDate": "08/04/2014 09:23:54",
      "content": "<p>Thank you so much KazAnova for detailed explanation...</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "55882",
      "postDate": "10/10/2014 10:33:49",
      "content": "<p>KazAnova Can you please share your solution here?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63732",
      "postDate": "02/06/2015 23:23:55",
      "content": "<p>[quote=KazAnova;50772]</p>\n<p>Hi guys, thanks for you kind words. Don't worry, we will explain what we did once we sort out the competition output requirements. It will help us to structure our thought-process as well! About the size of the data what really helped was to make a separate .csv file for each customer and put all their transactions in it. That way we could manipulate it at will. I will post a code for that, although it was really straight forward since the file was sorted by customer and date. All you had to do was:</p>\n<p>1) open a reader,</p>\n<p>2) stream each line</p>\n<p>3) paste the new line in a file (named as customer_id.csv) for as long as the customer was the same.</p>\n<p>and 4) switch to new file once the customer is different and so on.</p>\n<p>That way you have kind of done the indexing yourself and it is very easy to aggregate a file with 200-300 lines of transactions!</p>\n<p>:)</p>\n<p>I don't think I used more than 1 GB of Ram &nbsp;to create my training and test set.</p>\n<p>[/quote]</p>\n\n<p>Thank you KazAnova,</p>\n\n<p>We are wondering is there a complete version of the solution?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64149",
      "postDate": "02/12/2015 23:18:48",
      "content": "<p>There are some solutions in the second thread however leader's solution is the most wanted.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64150",
      "postDate": "02/12/2015 23:30:33",
      "content": "<p>The solution isn't allowed to be posted. I checked.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64274",
      "postDate": "02/15/2015 16:25:54",
      "content": "<p>[quote=bpeng;63732]</p>\n<p>KazAnova,</p>\n<p>We are wondering is there a complete version of the solution?</p>\n<p>[/quote]</p>\n<p>Sorry for the huge delay...I guess I do not know how to best handle this, but it is quite difficult for me to post anything, because I am currently working in an area very similar to this and I am bound by strict contractual commitments to not share this kind of methods&nbsp;:/ .&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64275",
      "postDate": "02/15/2015 16:31:57",
      "content": "<p>Kazanova - I had to get my 2nd place solution code removed from the forum. The anonymous sponsors didn't want us posting it</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64277",
      "postDate": "02/15/2015 17:37:36",
      "content": "<p>[quote=Bluefool;64275]</p>\n<p>Kazanova - I had to get my 2nd place solution code removed from the forum. The anonymous sponsors didn't want us posting it</p>\n<p>[/quote]</p>\n<p>Thanks for informing me about that. It seems there are too many barriers for this one...</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "64302",
      "postDate": "02/16/2015 02:12:45",
      "content": "<p>Sorry for teasing everyone (half-year after the events).</p>\n\n<p>Thank you very much for the participation in the competitions! And at all for the contribution to the community!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "114845",
      "postDate": "04/14/2016 07:37:42",
      "content": "<p>Where can I get any solutions of this competition? Thanks. </p>",
      "rawMarkdown": "Where can I get any solutions of this competition? Thanks.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 50612,
      "author_name": "furukama",
      "author_url": "",
      "post_date": "07/15/2014 21:14:39",
      "content": "<p>Congrats! Can't wait to see your solution to this problem, esp. the second problem.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 50750,
      "author_name": "ash208948",
      "author_url": "",
      "post_date": "07/17/2014 04:43:28",
      "content": "<p>Congrats KazAnova and thumbs up for the great job.</p>\n<p>I look forward to read more about details of your approaches and learn from the&nbsp;experience you have gained from this competition.</p>\n<p>All the best.</p>\n<p>Ashkan.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 50768,
      "author_name": "maslopo",
      "author_url": "",
      "post_date": "07/17/2014 12:38:38",
      "content": "<p>Really congratulations, you have done a great job, given the amount of data to be processed and the theme relating to the behavior of the consumer, I really hope to have some details on the method used and maybe even see some of the code or the model ... in the end I hope to have the opportunity to collaborate in the future.</p>\n<p>Massimo</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 50772,
      "author_name": "kazanova",
      "author_url": "",
      "post_date": "07/17/2014 13:09:30",
      "content": "<p>Hi guys, thanks for you kind words. Don't worry, we will explain what we did once we sort out the competition output requirements. It will help us to structure our thought-process as well! About the size of the data what really helped was to make a separate .csv file for each customer and put all their transactions in it. That way we could manipulate it at will. I will post a code for that, although it was really straight forward since the file was sorted by customer and date. All you had to do was:</p>\n<p>1) open a reader,</p>\n<p>2) stream each line</p>\n<p>3) paste the new line in a file (named as customer_id.csv) for as long as the customer was the same.</p>\n<p>and 4) switch to new file once the customer is different and so on.</p>\n<p>That way you have kind of done the indexing yourself and it is very easy to aggregate a file with 200-300 lines of transactions!</p>\n<p>:)</p>\n\n<p>I don't think I used more than 1 GB of Ram &nbsp;to create my training and test set.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 51581,
      "author_name": "trisco7",
      "author_url": "",
      "post_date": "08/04/2014 05:20:18",
      "content": "<p>Hi KazAnova,</p>\n<p>Many congrats for your win.</p>\n<p>Can you please explain what do you mean by similar offers? Is it on the basis of category or offer value?</p>\n\n<p>Then you said, &quot;I don't think I used more than 1 GB of Ram &nbsp;to create my training and test set.&quot;&nbsp;These sets are not the individual customer_id.csv files. Am I right?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 51592,
      "author_name": "kazanova",
      "author_url": "",
      "post_date": "08/04/2014 09:18:42",
      "content": "<p>[quote=Trisco7;51581]</p>\n<p>Hi KazAnova,</p>\n<p>Many congrats for your win.</p>\n<p>[/quote]</p>\n<p>Thx :)</p>\n<p>[quote=Trisco7;51581]</p>\n<p>Hi KazAnova,</p>\n<p>Can you please explain what do you mean by similar offers? Is it on the basis of category or offer value?</p>\n<p>[/quote]</p>\n<p>The initial idea about this was to&nbsp;create clusters of offers that either look like each other feature-wise (e.g. unsupervised learning ) or conceptually-wise , because they share same category, same popularity, they were listed together in the offer.csv(!) etc and train on these.</p>\n<p>However it did not work very well.</p>\n<p>At the end, we (mostly Gert) created unsupervised features that (I speculate) approximate that and dropped them into his model.</p>\n<p>[quote=Trisco7;51581]</p>\n<p>Hi KazAnova,</p>\n<p>Then you said, &quot;I don't think I used more than 1 GB of Ram to create my training and test set.&quot; These sets are not the individual customer_id.csv files. Am I right?</p>\n<p>[/quote]</p>\n<p>Both Gert and me, we created different sets. Here I was referring to the set I created which is a mixture of aggregate measures&nbsp;that map the relationship of the customer with the item (e.g how many times the customer bought from the same category in the last 30,60,90,120,150,180,360 days in the past) - similar to what Triskelion did.- as well as features that show how good the customer is in general (how many visits he's made, from how many different&nbsp;distinct&nbsp;categories he's bought from-e.g. cardinality measures)</p>\n<p>Generally, we are still waiting to finalize things with kaggle and also see how much we are allowed to share with you guys. We haven't forgotten about you though :)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 51593,
      "author_name": "trisco7",
      "author_url": "",
      "post_date": "08/04/2014 09:23:54",
      "content": "<p>Thank you so much KazAnova for detailed explanation...</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 55882,
      "author_name": "bilalarif",
      "author_url": "",
      "post_date": "10/10/2014 10:33:49",
      "content": "<p>KazAnova Can you please share your solution here?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63732,
      "author_name": "bpeng287607",
      "author_url": "",
      "post_date": "02/06/2015 23:23:55",
      "content": "<p>[quote=KazAnova;50772]</p>\n<p>Hi guys, thanks for you kind words. Don't worry, we will explain what we did once we sort out the competition output requirements. It will help us to structure our thought-process as well! About the size of the data what really helped was to make a separate .csv file for each customer and put all their transactions in it. That way we could manipulate it at will. I will post a code for that, although it was really straight forward since the file was sorted by customer and date. All you had to do was:</p>\n<p>1) open a reader,</p>\n<p>2) stream each line</p>\n<p>3) paste the new line in a file (named as customer_id.csv) for as long as the customer was the same.</p>\n<p>and 4) switch to new file once the customer is different and so on.</p>\n<p>That way you have kind of done the indexing yourself and it is very easy to aggregate a file with 200-300 lines of transactions!</p>\n<p>:)</p>\n<p>I don't think I used more than 1 GB of Ram &nbsp;to create my training and test set.</p>\n<p>[/quote]</p>\n\n<p>Thank you KazAnova,</p>\n\n<p>We are wondering is there a complete version of the solution?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64149,
      "author_name": "artemf",
      "author_url": "",
      "post_date": "02/12/2015 23:18:48",
      "content": "<p>There are some solutions in the second thread however leader's solution is the most wanted.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64150,
      "author_name": "domcastro",
      "author_url": "",
      "post_date": "02/12/2015 23:30:33",
      "content": "<p>The solution isn't allowed to be posted. I checked.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64274,
      "author_name": "kazanova",
      "author_url": "",
      "post_date": "02/15/2015 16:25:54",
      "content": "<p>[quote=bpeng;63732]</p>\n<p>KazAnova,</p>\n<p>We are wondering is there a complete version of the solution?</p>\n<p>[/quote]</p>\n<p>Sorry for the huge delay...I guess I do not know how to best handle this, but it is quite difficult for me to post anything, because I am currently working in an area very similar to this and I am bound by strict contractual commitments to not share this kind of methods&nbsp;:/ .&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64275,
      "author_name": "domcastro",
      "author_url": "",
      "post_date": "02/15/2015 16:31:57",
      "content": "<p>Kazanova - I had to get my 2nd place solution code removed from the forum. The anonymous sponsors didn't want us posting it</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64277,
      "author_name": "kazanova",
      "author_url": "",
      "post_date": "02/15/2015 17:37:36",
      "content": "<p>[quote=Bluefool;64275]</p>\n<p>Kazanova - I had to get my 2nd place solution code removed from the forum. The anonymous sponsors didn't want us posting it</p>\n<p>[/quote]</p>\n<p>Thanks for informing me about that. It seems there are too many barriers for this one...</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 64302,
      "author_name": "artemf",
      "author_url": "",
      "post_date": "02/16/2015 02:12:45",
      "content": "<p>Sorry for teasing everyone (half-year after the events).</p>\n\n<p>Thank you very much for the participation in the competitions! And at all for the contribution to the community!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 114845,
      "author_name": "bravesunshine",
      "author_url": "",
      "post_date": "04/14/2016 07:37:42",
      "content": "<p>Where can I get any solutions of this competition? Thanks. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "50542": "",
    "50612": "",
    "50750": "",
    "50768": "",
    "50772": "",
    "51581": "",
    "51592": "",
    "51593": "",
    "55882": "",
    "63732": "",
    "64149": "",
    "64150": "",
    "64274": "",
    "64275": "",
    "64277": "",
    "64302": "",
    "114845": "Where can I get any solutions of this competition? Thanks."
  },
  "source": "meta"
}