{
  "id": 20151,
  "title": "Beat the benchmark, 0.29 LB, in 5 mins",
  "url": "/competitions/expedia-hotel-recommendations/discussion/20151",
  "author_name": "",
  "post_date": "2016-04-15T19:52:29.940Z",
  "votes": 3,
  "comment_count": 6,
  "views": 2034,
  "content": "<p>very simple idea, find the most popular hotels in the corresponding destination.</p>\n\n<p>Enjoy : )</p>\n\n<p>also uploaded to kaggle script: <a href=\"https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/\">https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/</a></p>\n\n<p>took 15 mins</p>",
  "messages": [
    {
      "id": "115028",
      "postDate": "04/15/2016 19:52:29",
      "content": "<p>very simple idea, find the most popular hotels in the corresponding destination.</p>\n\n<p>Enjoy : )</p>\n\n<p>also uploaded to kaggle script: <a href=\"https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/\">https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/</a></p>\n\n<p>took 15 mins</p>",
      "rawMarkdown": "very simple idea, find the most popular hotels in the corresponding destination.\r\n\r\nEnjoy : )\r\n\r\nalso uploaded to kaggle script: https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/\r\n\r\ntook 15 mins",
      "votes": null
    },
    {
      "id": "115029",
      "postDate": "04/15/2016 19:57:21",
      "content": "<p>Please run it with pypy : )</p>",
      "rawMarkdown": "Please run it with pypy : )",
      "votes": null
    },
    {
      "id": "115036",
      "postDate": "04/15/2016 20:55:00",
      "content": "<p>Awesome, thx :D, super fast and clean!</p>",
      "rawMarkdown": "Awesome, thx :D, super fast and clean!",
      "votes": null
    },
    {
      "id": "115038",
      "postDate": "04/15/2016 21:04:59",
      "content": "<p>Nice one!</p>",
      "rawMarkdown": "Nice one!",
      "votes": null
    },
    {
      "id": "115039",
      "postDate": "04/15/2016 21:07:31",
      "content": "<p>@NxGTR, @Triskelion, thank you guys. The code is actually very lousy. What is the proper way to implement such a counter-like dictionary, and sort keys by values, without using pandas? </p>",
      "rawMarkdown": "NxGTR, @Triskelion, thank you guys. The code is actually very lousy. What is the proper way to implement such a counter-like dictionary, and sort keys by values, without using pandas?",
      "votes": null
    },
    {
      "id": "115040",
      "postDate": "04/15/2016 21:12:18",
      "content": "<p>Itemgetter or lambda key?</p>\n\n<p>Link to script does not work (you link to edit screen): </p>\n\n<p><a href=\"https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/edit\">https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/edit</a></p>\n\n<p><a href=\"https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/\">https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/</a></p>",
      "rawMarkdown": "Itemgetter or lambda key?\r\n\r\nLink to script does not work (you link to edit screen): \r\n\r\nhttps://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/edit\r\n\r\nhttps://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/",
      "votes": null
    },
    {
      "id": "115068",
      "postDate": "04/16/2016 01:30:23",
      "content": "<p>Thanx for the inspiration...tried to replicate the idea in R - picking the top 3 per destination. Thought constraining to actual bookings might help as a starting point for likely candidates...</p>\n\n<p>library(dplyr)</p>\n\n<p>train &lt;- read.csv(.....location....)</p>\n\n<p>temp &lt;- subset(train,train$is_booking==1) %&gt;%</p>\n\n<p>group_by(srch_destination_id,hotel_cluster) %&gt;%</p>\n\n<p>summarise(n=length(user_id)) %&gt;%</p>\n\n<p>top_n(n=3,wt=n) %&gt;%</p>\n\n<p>arrange(-n)</p>\n\n<p>Is there a more efficient way?</p>",
      "rawMarkdown": "Thanx for the inspiration...tried to replicate the idea in R - picking the top 3 per destination. Thought constraining to actual bookings might help as a starting point for likely candidates...\r\n\r\nlibrary(dplyr)\r\n\r\ntrain <- read.csv(.....location....)\r\n\r\ntemp <- subset(train,train$is_booking==1) %>%\r\n\r\n  group_by(srch_destination_id,hotel_cluster) %>%\r\n\r\n  summarise(n=length(user_id)) %>%\r\n\r\n  top_n(n=3,wt=n) %>%\r\n\r\n  arrange(-n)\r\n\r\nIs there a more efficient way?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 115029,
      "author_name": "jiweiliu",
      "author_url": "",
      "post_date": "04/15/2016 19:57:21",
      "content": "<p>Please run it with pypy : )</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115036,
      "author_name": "carloshuertas",
      "author_url": "",
      "post_date": "04/15/2016 20:55:00",
      "content": "<p>Awesome, thx :D, super fast and clean!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115038,
      "author_name": "triskelion",
      "author_url": "",
      "post_date": "04/15/2016 21:04:59",
      "content": "<p>Nice one!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115039,
      "author_name": "jiweiliu",
      "author_url": "",
      "post_date": "04/15/2016 21:07:31",
      "content": "<p>@NxGTR, @Triskelion, thank you guys. The code is actually very lousy. What is the proper way to implement such a counter-like dictionary, and sort keys by values, without using pandas? </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115040,
      "author_name": "triskelion",
      "author_url": "",
      "post_date": "04/15/2016 21:12:18",
      "content": "<p>Itemgetter or lambda key?</p>\n\n<p>Link to script does not work (you link to edit screen): </p>\n\n<p><a href=\"https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/edit\">https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/edit</a></p>\n\n<p><a href=\"https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/\">https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 115068,
      "author_name": "apowerpoint",
      "author_url": "",
      "post_date": "04/16/2016 01:30:23",
      "content": "<p>Thanx for the inspiration...tried to replicate the idea in R - picking the top 3 per destination. Thought constraining to actual bookings might help as a starting point for likely candidates...</p>\n\n<p>library(dplyr)</p>\n\n<p>train &lt;- read.csv(.....location....)</p>\n\n<p>temp &lt;- subset(train,train$is_booking==1) %&gt;%</p>\n\n<p>group_by(srch_destination_id,hotel_cluster) %&gt;%</p>\n\n<p>summarise(n=length(user_id)) %&gt;%</p>\n\n<p>top_n(n=3,wt=n) %&gt;%</p>\n\n<p>arrange(-n)</p>\n\n<p>Is there a more efficient way?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "115028": "very simple idea, find the most popular hotels in the corresponding destination.\r\n\r\nEnjoy : )\r\n\r\nalso uploaded to kaggle script: https://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/\r\n\r\ntook 15 mins",
    "115029": "Please run it with pypy : )",
    "115036": "Awesome, thx :D, super fast and clean!",
    "115038": "Nice one!",
    "115039": "NxGTR, @Triskelion, thank you guys. The code is actually very lousy. What is the proper way to implement such a counter-like dictionary, and sort keys by values, without using pandas?",
    "115040": "Itemgetter or lambda key?\r\n\r\nLink to script does not work (you link to edit screen): \r\n\r\nhttps://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/edit\r\n\r\nhttps://www.kaggle.com/jiweiliu/expedia-hotel-recommendations/most-popular-local-hotels/",
    "115068": "Thanx for the inspiration...tried to replicate the idea in R - picking the top 3 per destination. Thought constraining to actual bookings might help as a starting point for likely candidates...\r\n\r\nlibrary(dplyr)\r\n\r\ntrain <- read.csv(.....location....)\r\n\r\ntemp <- subset(train,train$is_booking==1) %>%\r\n\r\n  group_by(srch_destination_id,hotel_cluster) %>%\r\n\r\n  summarise(n=length(user_id)) %>%\r\n\r\n  top_n(n=3,wt=n) %>%\r\n\r\n  arrange(-n)\r\n\r\nIs there a more efficient way?"
  },
  "source": "meta"
}