{
  "id": 65989,
  "title": "Finding : totals_bounces and totals_transactionRevenue",
  "url": "/competitions/ga-customer-revenue-prediction/discussion/65989",
  "author_name": "Maxwell",
  "post_date": "2018-09-17T03:59:21.245000",
  "votes": 36,
  "comment_count": 19,
  "views": 0,
  "content": "<p>I found that when <code>totals_bounces</code> is missing, <br>\n<code>totals_transactionRevenue</code> is not zero (not NaN) in train data. <br>\nOtherwise if <code>totals_bounces</code> is <em>1</em>, <code>totals_transactionRevenue</code> seems to be <em>ZERO</em>.  </p>\n\n<p>Does anyone have comments?  </p>\n\n<hr>\n\n<p>Sorry. Let me fix. <br>\n&gt; when <code>totals_bounces</code> is missing, <br>\n&gt; <code>totals_transactionRevenue</code> is not zero (not NaN) in train data.  </p>\n\n<p>---&gt; When <code>totals_transactionRevenue</code> is not zero (not NaN) in train data, <br>\n<code>totals_bounces</code> is missing.</p>\n\n<hr>\n\n<p>I added 2 cross tabs. <br>\nThe second crosstab is inspired by <a href=\"https://www.kaggle.com/c/google-analytics-customer-revenue-prediction/discussion/65989#389033\">Daniel's comment</a>. <br>\n<em>*</em>_na means its value is <code>1</code>, when <code>NaN</code>.  </p>\n\n<p><img src=\"https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918220805.png\" alt=\"crosstab1\">\n<img src=\"https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918221048.png\" alt=\"crosstab2\"></p>",
  "messages": [
    {
      "id": 388462,
      "postDate": "2018-09-17T03:59:21.247Z",
      "content": "<p>I found that when <code>totals_bounces</code> is missing, <br>\n<code>totals_transactionRevenue</code> is not zero (not NaN) in train data. <br>\nOtherwise if <code>totals_bounces</code> is <em>1</em>, <code>totals_transactionRevenue</code> seems to be <em>ZERO</em>.  </p>\n\n<p>Does anyone have comments?  </p>\n\n<hr>\n\n<p>Sorry. Let me fix. <br>\n&gt; when <code>totals_bounces</code> is missing, <br>\n&gt; <code>totals_transactionRevenue</code> is not zero (not NaN) in train data.  </p>\n\n<p>---&gt; When <code>totals_transactionRevenue</code> is not zero (not NaN) in train data, <br>\n<code>totals_bounces</code> is missing.</p>\n\n<hr>\n\n<p>I added 2 cross tabs. <br>\nThe second crosstab is inspired by <a href=\"https://www.kaggle.com/c/google-analytics-customer-revenue-prediction/discussion/65989#389033\">Daniel's comment</a>. <br>\n<em>*</em>_na means its value is <code>1</code>, when <code>NaN</code>.  </p>\n\n<p><img src=\"https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918220805.png\" alt=\"crosstab1\">\n<img src=\"https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918221048.png\" alt=\"crosstab2\"></p>",
      "rawMarkdown": "I found that when `totals_bounces` is missing,   \n`totals_transactionRevenue` is not zero (not NaN) in train data.  \nOtherwise if `totals_bounces` is *1*, `totals_transactionRevenue` seems to be *ZERO*.  \n  \nDoes anyone have comments?  \n\n\n----------\n  \nSorry. Let me fix.  \n&gt; when `totals_bounces` is missing,  \n&gt; `totals_transactionRevenue` is not zero (not NaN) in train data.  \n\n---&gt; When `totals_transactionRevenue` is not zero (not NaN) in train data,    \n`totals_bounces` is missing.\n\n\n----------\n  \n  \nI added 2 cross tabs.  \nThe second crosstab is inspired by [Daniel's comment][1].  \n***_na means its value is `1`, when `NaN`.  \n\n![crosstab1][2]\n![crosstab2][3]\n\n\n  [1]: https://www.kaggle.com/c/google-analytics-customer-revenue-prediction/discussion/65989#389033\n  [2]: https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918220805.png\n  [3]: https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918221048.png",
      "votes": 36
    },
    {
      "id": 389209,
      "postDate": "2018-09-18T11:02:09.690Z",
      "content": "<p>I believe this finding should generalize as it is logical. A 'bounced session' is usually one where less than a certain threshold amount of time was spent/actions taken(usually attributed to users who were looking for something else and landed on your site by mistake). We should expect that these sessions wont yield transactions</p>",
      "rawMarkdown": "I believe this finding should generalize as it is logical. A 'bounced session' is usually one where less than a certain threshold amount of time was spent/actions taken(usually attributed to users who were looking for something else and landed on your site by mistake). We should expect that these sessions wont yield transactions",
      "votes": 6
    },
    {
      "id": 389033,
      "postDate": "2018-09-18T03:17:35.863Z",
      "content": "<p>A similar finding is: when <code>totals.hits</code> equals 1, <code>totals.transactionRevenue</code> is NaN.</p>\n\n<p>There are 446754 such sessions in train data.</p>",
      "rawMarkdown": "A similar finding is: when `totals.hits` equals 1, `totals.transactionRevenue` is NaN.\n\nThere are 446754 such sessions in train data.",
      "votes": 3,
      "replies": [
        {
          "id": 389281,
          "postDate": "2018-09-18T13:25:05.867Z",
          "content": "<p><a href=\"/lfcpeng17\">@lfcpeng17</a> <br>\nYou may be right. <br>\nBelow figure is cross tab of <code>hits</code> and <code>bounces</code>. <br>\n- <code>totals_bounces_na</code> is 1, when <code>bounces</code> is NaN. <br>\n- <code>totals_hits_1</code> is 1, when <code>hits</code> is 1.  </p>\n\n<p>So depending on your rule ( <code>hits</code> rule ), we can adjust more 74 records. <br>\n( 446,680 records have already adjusted by the <code>bounces</code> rule. )  </p>\n\n<p><img src=\"https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918221114.png\" alt=\"crosstab3\"></p>",
          "rawMarkdown": "@lfcpeng17  \nYou may be right.  \nBelow figure is cross tab of `hits` and `bounces`.  \n- `totals_bounces_na` is 1, when `bounces` is NaN.  \n- `totals_hits_1` is 1, when `hits` is 1.  \n  \nSo depending on your rule ( `hits` rule ), we can adjust more 74 records.  \n( 446,680 records have already adjusted by the `bounces` rule. )  \n\n![crosstab3][1]\n\n\n  [1]: https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918221114.png",
          "votes": 1
        }
      ]
    },
    {
      "id": 388984,
      "postDate": "2018-09-17T23:57:09.810Z",
      "content": "<p>Nice find. I modified my <a href=\"https://www.kaggle.com/jpmiller/showing-na-in-its-various-forms\">Finding NAs </a> kernel to look at these two columns. When Transaction Revenue is positive, Bounces is always NA. But Bounces is NA about half the time and less than 5% of those transactions have positive Transaction Revenue. If the test data is like the train data, then we can assign 0 revenue any time Bounces is positive (not NA). Otherwise it's less certain.</p>\n\n<p><img src=\"https://s3.amazonaws.com/nonwebstorage/Screenshot+from+2018-09-17+18-42-50.png\" alt=\"bounces\"></p>",
      "rawMarkdown": "Nice find. I modified my [Finding NAs ](https://www.kaggle.com/jpmiller/showing-na-in-its-various-forms) kernel to look at these two columns. When Transaction Revenue is positive, Bounces is always NA. But Bounces is NA about half the time and less than 5% of those transactions have positive Transaction Revenue. If the test data is like the train data, then we can assign 0 revenue any time Bounces is positive (not NA). Otherwise it's less certain.\n\n![bounces][1]\n\n\n  [1]:https://s3.amazonaws.com/nonwebstorage/Screenshot+from+2018-09-17+18-42-50.png",
      "votes": 3,
      "replies": [
        {
          "id": 388985,
          "postDate": "2018-09-17T23:58:26.700Z",
          "content": "<p>PS, is there a way to not make giant pictures in a post?</p>",
          "rawMarkdown": "PS, is there a way to not make giant pictures in a post?",
          "votes": 2
        },
        {
          "id": 389000,
          "postDate": "2018-09-18T00:50:53.713Z",
          "content": "<p>Thanks for visualization. <br>\nI totally agree with you. <br>\nHope this finding will not be <code>a trap</code>.  </p>",
          "rawMarkdown": "Thanks for visualization.  \nI totally agree with you.  \nHope this finding will not be `a trap`.  "
        }
      ]
    },
    {
      "id": 391713,
      "postDate": "2018-09-22T08:49:14.560Z",
      "content": "<p>Good find! What is interesting though, is that this phenomenon is by no means retricted to this one attrbute pair. I tried calculating the pairwise piccard similarity score of column missingness (take the maximum of missing vs missing and missing vs not missing) and found that there are many more columns for which the revenue is 0 (missing) whenever (or almost whenever) they are missing. However, most of these attributes tell us more about when revenue=0, which already happens almost all the time, so they are not as useful.\nWhat is interesting about bounces is that it tells us more about when revenue != 0, which is more interesting as it is the minority case. The following is a ROC curve plot for predicting revenue != 0 based on the missingness of several columns:\n(see uploaded file)\nWe might also infer from the plot that the missingness of newVisits and metro, while not as useful, might offer some help in predicting whether revenue = 0.</p>",
      "rawMarkdown": "Good find! What is interesting though, is that this phenomenon is by no means retricted to this one attrbute pair. I tried calculating the pairwise piccard similarity score of column missingness (take the maximum of missing vs missing and missing vs not missing) and found that there are many more columns for which the revenue is 0 (missing) whenever (or almost whenever) they are missing. However, most of these attributes tell us more about when revenue=0, which already happens almost all the time, so they are not as useful.\nWhat is interesting about bounces is that it tells us more about when revenue != 0, which is more interesting as it is the minority case. The following is a ROC curve plot for predicting revenue != 0 based on the missingness of several columns:\n(see uploaded file)\nWe might also infer from the plot that the missingness of newVisits and metro, while not as useful, might offer some help in predicting whether revenue = 0.\n",
      "votes": 1
    },
    {
      "id": 388581,
      "postDate": "2018-09-17T08:01:26.047Z",
      "content": "<p>It seems that there are some 'if' cases like this that can be formulated. The question is if they generalise...</p>",
      "rawMarkdown": "It seems that there are some 'if' cases like this that can be formulated. The question is if they generalise...",
      "votes": 2,
      "replies": [
        {
          "id": 388584,
          "postDate": "2018-09-17T08:08:10.820Z",
          "content": "<p>Thank you for your comments. <br>\nYes... If we can generalize those... <br>\nAgain leaky data set ? or just a trap ?</p>",
          "rawMarkdown": "Thank you for your comments.  \nYes... If we can generalize those...  \nAgain leaky data set ? or just a trap ?",
          "votes": 1
        },
        {
          "id": 388586,
          "postDate": "2018-09-17T08:10:09.730Z",
          "content": "<p>It could be that only the payment bounces (or at some point of the payment process) are taken into account. In this case it makes a lot of sense that if you are kicked out of the process, the revenue of the session is zero.</p>",
          "rawMarkdown": "It could be that only the payment bounces (or at some point of the payment process) are taken into account. In this case it makes a lot of sense that if you are kicked out of the process, the revenue of the session is zero.",
          "votes": 2
        },
        {
          "id": 388587,
          "postDate": "2018-09-17T08:15:55.907Z",
          "content": "<p>make sense. <br>\nIf your hypothesis is right, we can use this formula to adjust test predictions.  </p>",
          "rawMarkdown": "make sense.   \nIf your hypothesis is right, we can use this formula to adjust test predictions.  ",
          "votes": 1
        },
        {
          "id": 389081,
          "postDate": "2018-09-18T05:44:12.213Z",
          "content": "<p>I guess, if this behaviour does <strong>not</strong> generalise to the test sample all tree methods are screwed, since those will learn this kind of simple <code>if</code> conditions right away.</p>",
          "rawMarkdown": "I guess, if this behaviour does **not** generalise to the test sample all tree methods are screwed, since those will learn this kind of simple `if` conditions right away.",
          "votes": 6
        }
      ]
    },
    {
      "id": 391258,
      "postDate": "2018-09-21T13:22:42.847Z",
      "content": "<p>Interesting observations</p>",
      "rawMarkdown": "Interesting observations"
    },
    {
      "id": 392541,
      "postDate": "2018-09-24T00:27:20.347Z",
      "content": "<p>This is so obvious, since when taking it in practical situation, if a user has bounced off the revenue from his session would be zero. Hence when Bounce = 0 or NA will be accounted into those with successful transactions. Nice observation btw! :) </p>",
      "rawMarkdown": "This is so obvious, since when taking it in practical situation, if a user has bounced off the revenue from his session would be zero. Hence when Bounce = 0 or NA will be accounted into those with successful transactions. Nice observation btw! :) ",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 389182,
      "postDate": "2018-09-18T09:56:24.467Z",
      "rawMarkdown": "",
      "votes": 5,
      "isDeleted": true,
      "replies": [
        {
          "id": 389260,
          "postDate": "2018-09-18T12:39:03.787Z",
          "content": "<blockquote>\n  <p>The code below imputes zero predicted revenue to all the records in\n  test that have positive 'totals_bounces', and doing this reduced my\n  RMSE by 0.0001 on the public leaderboard.</p>\n  \n  <p>The idea is as follows: If I understand the feature 'totals_bounces'\n  correctly, a positive value means that the user stumbled on the site\n  (probably clicked on some ad by accident) and left right away. In this\n  sense, this user should not have any purchase at all. This is very\n  well reflected by the training data and at first I thought the model\n  should be able to pick this up easily. Howerver, after some\n  experiments I failed to use this feature in any meaningful way. That's\n  why I tried to use this to do some postprocessing.</p>\n  \n  <p>I acutally expected a boost more than 0.0001, as half of the records\n  in test have positive bounces. But it seems my model has already done\n  a decent job dealing with these cases.  </p>\n</blockquote>\n\n<p>Great experiment. <br>\nLooks LGBM have already treated this. <br>\nSo the boost of post processing was not so much. <br>\nThanks.</p>",
          "rawMarkdown": "&gt; The code below imputes zero predicted revenue to all the records in\n&gt; test that have positive 'totals_bounces', and doing this reduced my\n&gt; RMSE by 0.0001 on the public leaderboard.\n&gt; \n&gt; The idea is as follows: If I understand the feature 'totals_bounces'\n&gt; correctly, a positive value means that the user stumbled on the site\n&gt; (probably clicked on some ad by accident) and left right away. In this\n&gt; sense, this user should not have any purchase at all. This is very\n&gt; well reflected by the training data and at first I thought the model\n&gt; should be able to pick this up easily. Howerver, after some\n&gt; experiments I failed to use this feature in any meaningful way. That's\n&gt; why I tried to use this to do some postprocessing.\n&gt; \n&gt; I acutally expected a boost more than 0.0001, as half of the records\n&gt; in test have positive bounces. But it seems my model has already done\n&gt; a decent job dealing with these cases.  \n  \nGreat experiment.  \nLooks LGBM have already treated this.  \nSo the boost of post processing was not so much.  \nThanks.",
          "votes": 1
        },
        {
          "id": 389756,
          "postDate": "2018-09-19T06:53:17.480Z",
          "content": "<p>Yes, this is the definition:</p>\n\n<blockquote>\n  <p>A bounce is a single-page session on your site. In Analytics, a bounce is calculated specifically as a session that triggers only a single request to the Analytics server, such as when a user opens a single page on your site and then exits without triggering any other requests to the Analytics server during that session.</p>\n</blockquote>\n\n<p>Since you would always first have to select a product, move to another page to pay etc, a single-page session (so a bounce) can never lead to a transaction.</p>",
          "rawMarkdown": "Yes, this is the definition:\n\n&gt;A bounce is a single-page session on your site. In Analytics, a bounce is calculated specifically as a session that triggers only a single request to the Analytics server, such as when a user opens a single page on your site and then exits without triggering any other requests to the Analytics server during that session.\n\nSince you would always first have to select a product, move to another page to pay etc, a single-page session (so a bounce) can never lead to a transaction.",
          "votes": 9
        },
        {
          "id": 393690,
          "postDate": "2018-09-25T19:03:49.817Z",
          "content": "<p>Can you share where you found that definition? Thanks</p>",
          "rawMarkdown": "Can you share where you found that definition? Thanks"
        },
        {
          "id": 394029,
          "postDate": "2018-09-26T08:19:33.780Z",
          "content": "<p>Sure....what about Google Analytics help ;-)?\n<a href=\"https://support.google.com/analytics/answer/1009409?hl=en\">https://support.google.com/analytics/answer/1009409?hl=en</a></p>",
          "rawMarkdown": "Sure....what about Google Analytics help ;-)?\nhttps://support.google.com/analytics/answer/1009409?hl=en"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 389209,
      "author_name": "Abhimanyu Dikshit",
      "author_url": "",
      "post_date": "2018-09-18T11:02:09.690000",
      "content": "<p>I believe this finding should generalize as it is logical. A 'bounced session' is usually one where less than a certain threshold amount of time was spent/actions taken(usually attributed to users who were looking for something else and landed on your site by mistake). We should expect that these sessions wont yield transactions</p>",
      "votes": 6,
      "replies": []
    },
    {
      "id": 389033,
      "author_name": "Daniel",
      "author_url": "",
      "post_date": "2018-09-18T03:17:35.863000",
      "content": "<p>A similar finding is: when <code>totals.hits</code> equals 1, <code>totals.transactionRevenue</code> is NaN.</p>\n\n<p>There are 446754 such sessions in train data.</p>",
      "votes": 3,
      "replies": [
        {
          "id": 389281,
          "author_name": "Maxwell",
          "author_url": "",
          "post_date": "2018-09-18T13:25:05.867000",
          "content": "<p><a href=\"/lfcpeng17\">@lfcpeng17</a> <br>\nYou may be right. <br>\nBelow figure is cross tab of <code>hits</code> and <code>bounces</code>. <br>\n- <code>totals_bounces_na</code> is 1, when <code>bounces</code> is NaN. <br>\n- <code>totals_hits_1</code> is 1, when <code>hits</code> is 1.  </p>\n\n<p>So depending on your rule ( <code>hits</code> rule ), we can adjust more 74 records. <br>\n( 446,680 records have already adjusted by the <code>bounces</code> rule. )  </p>\n\n<p><img src=\"https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918221114.png\" alt=\"crosstab3\"></p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 388984,
      "author_name": "JohnM",
      "author_url": "",
      "post_date": "2018-09-17T23:57:09.810000",
      "content": "<p>Nice find. I modified my <a href=\"https://www.kaggle.com/jpmiller/showing-na-in-its-various-forms\">Finding NAs </a> kernel to look at these two columns. When Transaction Revenue is positive, Bounces is always NA. But Bounces is NA about half the time and less than 5% of those transactions have positive Transaction Revenue. If the test data is like the train data, then we can assign 0 revenue any time Bounces is positive (not NA). Otherwise it's less certain.</p>\n\n<p><img src=\"https://s3.amazonaws.com/nonwebstorage/Screenshot+from+2018-09-17+18-42-50.png\" alt=\"bounces\"></p>",
      "votes": 3,
      "replies": [
        {
          "id": 388985,
          "author_name": "JohnM",
          "author_url": "",
          "post_date": "2018-09-17T23:58:26.700000",
          "content": "<p>PS, is there a way to not make giant pictures in a post?</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 389000,
          "author_name": "Maxwell",
          "author_url": "",
          "post_date": "2018-09-18T00:50:53.713000",
          "content": "<p>Thanks for visualization. <br>\nI totally agree with you. <br>\nHope this finding will not be <code>a trap</code>.  </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 391713,
      "author_name": "Mithrillion",
      "author_url": "",
      "post_date": "2018-09-22T08:49:14.560000",
      "content": "<p>Good find! What is interesting though, is that this phenomenon is by no means retricted to this one attrbute pair. I tried calculating the pairwise piccard similarity score of column missingness (take the maximum of missing vs missing and missing vs not missing) and found that there are many more columns for which the revenue is 0 (missing) whenever (or almost whenever) they are missing. However, most of these attributes tell us more about when revenue=0, which already happens almost all the time, so they are not as useful.\nWhat is interesting about bounces is that it tells us more about when revenue != 0, which is more interesting as it is the minority case. The following is a ROC curve plot for predicting revenue != 0 based on the missingness of several columns:\n(see uploaded file)\nWe might also infer from the plot that the missingness of newVisits and metro, while not as useful, might offer some help in predicting whether revenue = 0.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 388581,
      "author_name": "Adams",
      "author_url": "",
      "post_date": "2018-09-17T08:01:26.047000",
      "content": "<p>It seems that there are some 'if' cases like this that can be formulated. The question is if they generalise...</p>",
      "votes": 2,
      "replies": [
        {
          "id": 388584,
          "author_name": "Maxwell",
          "author_url": "",
          "post_date": "2018-09-17T08:08:10.820000",
          "content": "<p>Thank you for your comments. <br>\nYes... If we can generalize those... <br>\nAgain leaky data set ? or just a trap ?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 388586,
          "author_name": "Adams",
          "author_url": "",
          "post_date": "2018-09-17T08:10:09.730000",
          "content": "<p>It could be that only the payment bounces (or at some point of the payment process) are taken into account. In this case it makes a lot of sense that if you are kicked out of the process, the revenue of the session is zero.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 388587,
          "author_name": "Maxwell",
          "author_url": "",
          "post_date": "2018-09-17T08:15:55.907000",
          "content": "<p>make sense. <br>\nIf your hypothesis is right, we can use this formula to adjust test predictions.  </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 389081,
          "author_name": "Misha Lisovyi",
          "author_url": "",
          "post_date": "2018-09-18T05:44:12.213000",
          "content": "<p>I guess, if this behaviour does <strong>not</strong> generalise to the test sample all tree methods are screwed, since those will learn this kind of simple <code>if</code> conditions right away.</p>",
          "votes": 6,
          "replies": []
        }
      ]
    },
    {
      "id": 391258,
      "author_name": "Pavan Sanagapati",
      "author_url": "",
      "post_date": "2018-09-21T13:22:42.847000",
      "content": "<p>Interesting observations</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 392541,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-09-24T00:27:20.347000",
      "content": "<p>This is so obvious, since when taking it in practical situation, if a user has bounced off the revenue from his session would be zero. Hence when Bounce = 0 or NA will be accounted into those with successful transactions. Nice observation btw! :) </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 389182,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-09-18T09:56:24.467000",
      "content": "",
      "votes": 5,
      "replies": [
        {
          "id": 389260,
          "author_name": "Maxwell",
          "author_url": "",
          "post_date": "2018-09-18T12:39:03.787000",
          "content": "<blockquote>\n  <p>The code below imputes zero predicted revenue to all the records in\n  test that have positive 'totals_bounces', and doing this reduced my\n  RMSE by 0.0001 on the public leaderboard.</p>\n  \n  <p>The idea is as follows: If I understand the feature 'totals_bounces'\n  correctly, a positive value means that the user stumbled on the site\n  (probably clicked on some ad by accident) and left right away. In this\n  sense, this user should not have any purchase at all. This is very\n  well reflected by the training data and at first I thought the model\n  should be able to pick this up easily. Howerver, after some\n  experiments I failed to use this feature in any meaningful way. That's\n  why I tried to use this to do some postprocessing.</p>\n  \n  <p>I acutally expected a boost more than 0.0001, as half of the records\n  in test have positive bounces. But it seems my model has already done\n  a decent job dealing with these cases.  </p>\n</blockquote>\n\n<p>Great experiment. <br>\nLooks LGBM have already treated this. <br>\nSo the boost of post processing was not so much. <br>\nThanks.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 389756,
          "author_name": "Erik Bruin",
          "author_url": "",
          "post_date": "2018-09-19T06:53:17.480000",
          "content": "<p>Yes, this is the definition:</p>\n\n<blockquote>\n  <p>A bounce is a single-page session on your site. In Analytics, a bounce is calculated specifically as a session that triggers only a single request to the Analytics server, such as when a user opens a single page on your site and then exits without triggering any other requests to the Analytics server during that session.</p>\n</blockquote>\n\n<p>Since you would always first have to select a product, move to another page to pay etc, a single-page session (so a bounce) can never lead to a transaction.</p>",
          "votes": 9,
          "replies": []
        },
        {
          "id": 393690,
          "author_name": "Allen",
          "author_url": "",
          "post_date": "2018-09-25T19:03:49.817000",
          "content": "<p>Can you share where you found that definition? Thanks</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 394029,
          "author_name": "Erik Bruin",
          "author_url": "",
          "post_date": "2018-09-26T08:19:33.780000",
          "content": "<p>Sure....what about Google Analytics help ;-)?\n<a href=\"https://support.google.com/analytics/answer/1009409?hl=en\">https://support.google.com/analytics/answer/1009409?hl=en</a></p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "388462": "I found that when `totals_bounces` is missing,   \n`totals_transactionRevenue` is not zero (not NaN) in train data.  \nOtherwise if `totals_bounces` is *1*, `totals_transactionRevenue` seems to be *ZERO*.  \n  \nDoes anyone have comments?  \n\n\n----------\n  \nSorry. Let me fix.  \n&gt; when `totals_bounces` is missing,  \n&gt; `totals_transactionRevenue` is not zero (not NaN) in train data.  \n\n---&gt; When `totals_transactionRevenue` is not zero (not NaN) in train data,    \n`totals_bounces` is missing.\n\n\n----------\n  \n  \nI added 2 cross tabs.  \nThe second crosstab is inspired by [Daniel's comment][1].  \n***_na means its value is `1`, when `NaN`.  \n\n![crosstab1][2]\n![crosstab2][3]\n\n\n  [1]: https://www.kaggle.com/c/google-analytics-customer-revenue-prediction/discussion/65989#389033\n  [2]: https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918220805.png\n  [3]: https://cdn-ak.f.st-hatena.com/images/fotolife/g/greenwind120170/20180918/20180918221048.png",
    "389209": "I believe this finding should generalize as it is logical. A 'bounced session' is usually one where less than a certain threshold amount of time was spent/actions taken(usually attributed to users who were looking for something else and landed on your site by mistake). We should expect that these sessions wont yield transactions",
    "389033": "A similar finding is: when `totals.hits` equals 1, `totals.transactionRevenue` is NaN.\n\nThere are 446754 such sessions in train data.",
    "388984": "Nice find. I modified my [Finding NAs ](https://www.kaggle.com/jpmiller/showing-na-in-its-various-forms) kernel to look at these two columns. When Transaction Revenue is positive, Bounces is always NA. But Bounces is NA about half the time and less than 5% of those transactions have positive Transaction Revenue. If the test data is like the train data, then we can assign 0 revenue any time Bounces is positive (not NA). Otherwise it's less certain.\n\n![bounces][1]\n\n\n  [1]:https://s3.amazonaws.com/nonwebstorage/Screenshot+from+2018-09-17+18-42-50.png",
    "391713": "Good find! What is interesting though, is that this phenomenon is by no means retricted to this one attrbute pair. I tried calculating the pairwise piccard similarity score of column missingness (take the maximum of missing vs missing and missing vs not missing) and found that there are many more columns for which the revenue is 0 (missing) whenever (or almost whenever) they are missing. However, most of these attributes tell us more about when revenue=0, which already happens almost all the time, so they are not as useful.\nWhat is interesting about bounces is that it tells us more about when revenue != 0, which is more interesting as it is the minority case. The following is a ROC curve plot for predicting revenue != 0 based on the missingness of several columns:\n(see uploaded file)\nWe might also infer from the plot that the missingness of newVisits and metro, while not as useful, might offer some help in predicting whether revenue = 0.\n",
    "388581": "It seems that there are some 'if' cases like this that can be formulated. The question is if they generalise...",
    "391258": "Interesting observations",
    "392541": "This is so obvious, since when taking it in practical situation, if a user has bounced off the revenue from his session would be zero. Hence when Bounce = 0 or NA will be accounted into those with successful transactions. Nice observation btw! :) ",
    "389182": ""
  }
}