{
  "id": 5774,
  "title": "Values of compX_inv and compX_rate_percent_diff",
  "url": "/competitions/expedia-personalized-sort/discussion/5774",
  "author_name": "",
  "post_date": "2013-09-16T15:32:46.197Z",
  "votes": null,
  "comment_count": 3,
  "views": 1443,
  "content": "<p>1) The definition for compX_inv is as follows:</p>\n<p>+1 if competitor X does not have availability in the hotel; 0 if both <br>Expedia and competitor X have availability; null signifies there is no <br>competitive data</p>\n<p>Question: What does&nbsp; -1 signify for this feature? A value of -1 is specified in the definition of compX_rate, but not for compX_inv.</p>\n<p>2) The definition for&nbsp;compX_rate_percent_diff is as follows:</p>\n<p>The absolute percentage difference (if one exists) between Expedia and <br>competitor X&#8217;s price (Expedia&#8217;s price the denominator);&nbsp;null signifies <br>there is no competitive data</p>\n<p>Question A: Why are some of the values so crazy large? For example, the max comp2_rate_percent_diff is 1 439 917%</p>\n<p>Question B: Is the formula for this feature as is:</p>\n<p>| ExpediaPrice - CompXPrice | / ExpediaPrice</p>",
  "messages": [
    {
      "id": "30981",
      "postDate": "09/16/2013 15:32:46",
      "content": "<p>1) The definition for compX_inv is as follows:</p>\n<p>+1 if competitor X does not have availability in the hotel; 0 if both <br>Expedia and competitor X have availability; null signifies there is no <br>competitive data</p>\n<p>Question: What does&nbsp; -1 signify for this feature? A value of -1 is specified in the definition of compX_rate, but not for compX_inv.</p>\n<p>2) The definition for&nbsp;compX_rate_percent_diff is as follows:</p>\n<p>The absolute percentage difference (if one exists) between Expedia and <br>competitor X&#8217;s price (Expedia&#8217;s price the denominator);&nbsp;null signifies <br>there is no competitive data</p>\n<p>Question A: Why are some of the values so crazy large? For example, the max comp2_rate_percent_diff is 1 439 917%</p>\n<p>Question B: Is the formula for this feature as is:</p>\n<p>| ExpediaPrice - CompXPrice | / ExpediaPrice</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "30982",
      "postDate": "09/16/2013 16:13:59",
      "content": "<p>1. If compX_inv = -1 then a given hotel should not appear in rankings. Cases where compX_inv = -1 correspond to matching to aggregate scores, see the last post under https://www.kaggle.com/c/expedia-personalized-sort/forums/t/5690/questions-about-search-results.</p>\n<p>Assume for example that over a certain period (and for specific check-in and check-out dates) a hotel had no inventory on Expedia (i.e. had scores of -1), except for one day when the search was performed when we had available rooms. Assuming we can not match exactly a hotel, search, check-in and check-out dates, we use a fall-back score, which in this case is -1.</p>\n<p>A safe strategy is in such cases would be to set compX_inv = NULL.</p>\n<p>2.A. This is a data quality issue. As I wrote before, the scraping mechanism is not always accurate. You should consider such big values as outliers.</p>\n<p>2.B. If compx_rate in (-1, 1) then compx_rate_percent_diff = 100*abs(ExpediaPrice - CompXPrice ) / ExpediaPrice else compx_rate_percent_diff = NULL .</p>\n<p>&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31216",
      "postDate": "09/19/2013 19:34:35",
      "content": "<p>Just a follow up on this, I noticed many records contain a 0 in the compX_rate column and contain a positive value in the corresponding compX_rate_percent_diff column. &nbsp;For example, srch_id=67500, site_id=5 has a 0 for comp8_rate and a 60 for comp8_rate_percent_diff.</p>\n<p>This shouldn't be possible given that compX_rate = 0 is supposed to represent where a given competitor had a matching price with Expedia, which would imply a 0 percent difference and thus comp8_rate_percent_diff should = 0.</p>\n<p>I'm sure this is just some normal data noise, but my question is which should we trust more, the compX_rate column or the compX_rate_percent_diff column? &nbsp;In the example of srch_id=67500, site_id=5, we can override the compX_rate field with a 1 or override the compX_rate_percent_diff with a 0, but that all depends on which data field we think is more accurate.</p>\n<p>Thanks for your help. &nbsp;And like others have said, thanks for sponsoring this competition! It's a little &quot;outside the box&quot; from other competitions in a fun and interesting way, very cool challenge.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31239",
      "postDate": "09/20/2013 07:58:28",
      "content": "<p>I can see two possible reasons for this unexpected behavior:</p>\n<p>- this is a data quality issue as compX_rate, ExpediaPrice and CompXPrice (the latter two giving rise to compx_rate_percent_diff) are taken as they are from our data warehouse, without any cleaning,</p>\n<p>- it it because we match to aggregate scores. More precisely, I can imagine this happening when compX_rate often change signs and correspond to different values of compX_rate_percent_diff; then the average of compX_rate over a certain period can be 0, but compX_rate_percent_diff can be different than 0.</p>\n<p>&nbsp;</p>\n<p>It is worth stressing that the main reason we decided to use fall back aggregated scores is because the exact matching over hotel, search, check-in and check-out dates gave low coverage. The price we have to pay for a higher coverage is that the signal in these columns is more diluted.</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>\n<p>X</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 30982,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "09/16/2013 16:13:59",
      "content": "<p>1. If compX_inv = -1 then a given hotel should not appear in rankings. Cases where compX_inv = -1 correspond to matching to aggregate scores, see the last post under https://www.kaggle.com/c/expedia-personalized-sort/forums/t/5690/questions-about-search-results.</p>\n<p>Assume for example that over a certain period (and for specific check-in and check-out dates) a hotel had no inventory on Expedia (i.e. had scores of -1), except for one day when the search was performed when we had available rooms. Assuming we can not match exactly a hotel, search, check-in and check-out dates, we use a fall-back score, which in this case is -1.</p>\n<p>A safe strategy is in such cases would be to set compX_inv = NULL.</p>\n<p>2.A. This is a data quality issue. As I wrote before, the scraping mechanism is not always accurate. You should consider such big values as outliers.</p>\n<p>2.B. If compx_rate in (-1, 1) then compx_rate_percent_diff = 100*abs(ExpediaPrice - CompXPrice ) / ExpediaPrice else compx_rate_percent_diff = NULL .</p>\n<p>&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31216,
      "author_name": "bryangregory",
      "author_url": "",
      "post_date": "09/19/2013 19:34:35",
      "content": "<p>Just a follow up on this, I noticed many records contain a 0 in the compX_rate column and contain a positive value in the corresponding compX_rate_percent_diff column. &nbsp;For example, srch_id=67500, site_id=5 has a 0 for comp8_rate and a 60 for comp8_rate_percent_diff.</p>\n<p>This shouldn't be possible given that compX_rate = 0 is supposed to represent where a given competitor had a matching price with Expedia, which would imply a 0 percent difference and thus comp8_rate_percent_diff should = 0.</p>\n<p>I'm sure this is just some normal data noise, but my question is which should we trust more, the compX_rate column or the compX_rate_percent_diff column? &nbsp;In the example of srch_id=67500, site_id=5, we can override the compX_rate field with a 1 or override the compX_rate_percent_diff with a 0, but that all depends on which data field we think is more accurate.</p>\n<p>Thanks for your help. &nbsp;And like others have said, thanks for sponsoring this competition! It's a little &quot;outside the box&quot; from other competitions in a fun and interesting way, very cool challenge.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31239,
      "author_name": "adamwoz",
      "author_url": "",
      "post_date": "09/20/2013 07:58:28",
      "content": "<p>I can see two possible reasons for this unexpected behavior:</p>\n<p>- this is a data quality issue as compX_rate, ExpediaPrice and CompXPrice (the latter two giving rise to compx_rate_percent_diff) are taken as they are from our data warehouse, without any cleaning,</p>\n<p>- it it because we match to aggregate scores. More precisely, I can imagine this happening when compX_rate often change signs and correspond to different values of compX_rate_percent_diff; then the average of compX_rate over a certain period can be 0, but compX_rate_percent_diff can be different than 0.</p>\n<p>&nbsp;</p>\n<p>It is worth stressing that the main reason we decided to use fall back aggregated scores is because the exact matching over hotel, search, check-in and check-out dates gave low coverage. The price we have to pay for a higher coverage is that the signal in these columns is more diluted.</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>\n<p>X</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "30981": "",
    "30982": "",
    "31216": "",
    "31239": ""
  },
  "source": "meta"
}