{
  "id": 46078,
  "title": "Solution sharing",
  "url": "/competitions/kkbox-churn-prediction-challenge/writeups/infinitewing-solution-sharing",
  "author_name": "",
  "post_date": "2017-12-20T09:37:08.117Z",
  "votes": 8,
  "comment_count": 8,
  "views": 0,
  "content": "<p>Hi, congrats to the winners, and thanks everyone. Here is the brief description of my solution:\n<br><br></p>\n\n<h3>1. Re-labeling</h3>\n\n<p>According to <a href=\"https://www.kaggle.com/c/kkbox-churn-prediction-challenge/discussion/45991\">this post</a>, the training sets posted for the contest differed greatly to the label generated by scala code. In my solution, one of my model use the scala label, and the other model use the label generated by <a href=\"https://github.com/InfiniteWing/Kaggle/blob/master/KKBOX%20churn/code/labeler_v2_final.py\">my python script</a>(I did not optimize the code yet). \n<br><br></p>\n\n<h3>2. Features</h3>\n\n<p>Here is the list of my features, feel free to ask me if the feature name is hard to understand:</p>\n\n<p>P.S. For 201702 churner(whose membership expired in 201702), I trace the log which is between 20170101 to 20170131.</p>\n\n<p>['payment_method_id', 'payment_plan_days', 'plan_list_price', 'actual_amount_paid', 'is_auto_renew', 'last_1_is_churn', 'last_2_is_churn', 'last_3_is_churn', 'last_4_is_churn', 'last_5_is_churn', 'churn_rate', 'churn_count', 'transaction_count', 'discount', 'is_discount', 'amt_per_day', 'num_25_mean', 'num_50_mean', 'num_75_mean', 'num_985_mean', 'num_100_mean', 'num_unq_mean', 'total_secs_mean', 'num_25_sum', 'num_50_sum', 'num_75_sum', 'num_985_sum', 'num_100_sum', 'num_unq_sum', 'total_secs_sum', 'count', 'city', 'bd', 'gender', 'registered_via', 'registration_init_time']\n<br><br></p>\n\n<h3>3. Models</h3>\n\n<p>I use xgboost, lightGBM, and CatBoost to predict churner, and then simply average the prediction. Here is the feature importance of lightGBM model.</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/260458/8095/feature_importance_0.png\" alt=\"feature importance of lightGBM model\" title=\"\"></p>\n\n<p>Thanks, and see you next competition.</p>",
  "messages": [
    {
      "id": "260458",
      "postDate": "12/20/2017 08:25:19",
      "content": "<p>Hi, congrats to the winners, and thanks everyone. Here is the brief description of my solution:\n<br><br></p>\n\n<h3>1. Re-labeling</h3>\n\n<p>According to <a href=\"https://www.kaggle.com/c/kkbox-churn-prediction-challenge/discussion/45991\">this post</a>, the training sets posted for the contest differed greatly to the label generated by scala code. In my solution, one of my model use the scala label, and the other model use the label generated by <a href=\"https://github.com/InfiniteWing/Kaggle/blob/master/KKBOX%20churn/code/labeler_v2_final.py\">my python script</a>(I did not optimize the code yet). \n<br><br></p>\n\n<h3>2. Features</h3>\n\n<p>Here is the list of my features, feel free to ask me if the feature name is hard to understand:</p>\n\n<p>P.S. For 201702 churner(whose membership expired in 201702), I trace the log which is between 20170101 to 20170131.</p>\n\n<p>['payment_method_id', 'payment_plan_days', 'plan_list_price', 'actual_amount_paid', 'is_auto_renew', 'last_1_is_churn', 'last_2_is_churn', 'last_3_is_churn', 'last_4_is_churn', 'last_5_is_churn', 'churn_rate', 'churn_count', 'transaction_count', 'discount', 'is_discount', 'amt_per_day', 'num_25_mean', 'num_50_mean', 'num_75_mean', 'num_985_mean', 'num_100_mean', 'num_unq_mean', 'total_secs_mean', 'num_25_sum', 'num_50_sum', 'num_75_sum', 'num_985_sum', 'num_100_sum', 'num_unq_sum', 'total_secs_sum', 'count', 'city', 'bd', 'gender', 'registered_via', 'registration_init_time']\n<br><br></p>\n\n<h3>3. Models</h3>\n\n<p>I use xgboost, lightGBM, and CatBoost to predict churner, and then simply average the prediction. Here is the feature importance of lightGBM model.</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/260458/8095/feature_importance_0.png\" alt=\"feature importance of lightGBM model\" title=\"\"></p>\n\n<p>Thanks, and see you next competition.</p>",
      "rawMarkdown": "Hi, congrats to the winners, and thanks everyone. Here is the brief description of my solution:\n<br><br>\n### 1. Re-labeling\nAccording to [this post](https://www.kaggle.com/c/kkbox-churn-prediction-challenge/discussion/45991), the training sets posted for the contest differed greatly to the label generated by scala code. In my solution, one of my model use the scala label, and the other model use the label generated by [my python script](https://github.com/InfiniteWing/Kaggle/blob/master/KKBOX%20churn/code/labeler_v2_final.py)(I did not optimize the code yet). \n<br><br>\n### 2. Features\nHere is the list of my features, feel free to ask me if the feature name is hard to understand:\n\nP.S. For 201702 churner(whose membership expired in 201702), I trace the log which is between 20170101 to 20170131.\n\n['payment_method_id', 'payment_plan_days', 'plan_list_price', 'actual_amount_paid', 'is_auto_renew', 'last_1_is_churn', 'last_2_is_churn', 'last_3_is_churn', 'last_4_is_churn', 'last_5_is_churn', 'churn_rate', 'churn_count', 'transaction_count', 'discount', 'is_discount', 'amt_per_day', 'num_25_mean', 'num_50_mean', 'num_75_mean', 'num_985_mean', 'num_100_mean', 'num_unq_mean', 'total_secs_mean', 'num_25_sum', 'num_50_sum', 'num_75_sum', 'num_985_sum', 'num_100_sum', 'num_unq_sum', 'total_secs_sum', 'count', 'city', 'bd', 'gender', 'registered_via', 'registration_init_time']\n<br><br>\n### 3. Models\nI use xgboost, lightGBM, and CatBoost to predict churner, and then simply average the prediction. Here is the feature importance of lightGBM model.\n\n![feature importance of lightGBM model][1]\n\n\n  [1]: https://kaggle2.blob.core.windows.net/forum-message-attachments/260458/8095/feature_importance_0.png\n\nThanks, and see you next competition.",
      "votes": null
    },
    {
      "id": "260682",
      "postDate": "12/20/2017 18:04:09",
      "content": "<p>Hi, </p>\n\n<p>Thank you for sharing the solution. You have build some interesting features. Will you please elaborate on the features as \"last_no_is_churn\"? These features shows significant correlation in the model.</p>",
      "rawMarkdown": "Hi, \n\nThank you for sharing the solution. You have build some interesting features. Will you please elaborate on the features as \"last_no_is_churn\"? These features shows significant correlation in the model.",
      "votes": null
    },
    {
      "id": "260832",
      "postDate": "12/21/2017 02:33:30",
      "content": "<p>Hi, Aniket, </p>\n\n<p>If one member had membership expire five times in the past, for example 201603, 201604, 201605, 201606, and 201607, \"last_1_is_churn\" means did this member churn in 201607 or not; \"last_2_is_churn\" means did this member churn in 201606 or not; and so on.</p>",
      "rawMarkdown": "Hi, Aniket, \n\nIf one member had membership expire five times in the past, for example 201603, 201604, 201605, 201606, and 201607, \"last_1_is_churn\" means did this member churn in 201607 or not; \"last_2_is_churn\" means did this member churn in 201606 or not; and so on.",
      "votes": null
    },
    {
      "id": "260892",
      "postDate": "12/21/2017 05:48:26",
      "content": "<p>Thank you for the explanation. It is impressive to learn this kind of features from the expiration columns. It is no wonder that your solution finished so higher in the competition.</p>",
      "rawMarkdown": "Thank you for the explanation. It is impressive to learn this kind of features from the expiration columns. It is no wonder that your solution finished so higher in the competition.",
      "votes": null
    },
    {
      "id": "268432",
      "postDate": "01/14/2018 13:05:08",
      "content": "<p>Congrats, InfiniteWing! On the re-labeling, do those models based on re-labeled data have better performances?</p>",
      "rawMarkdown": "Congrats, InfiniteWing! On the re-labeling, do those models based on re-labeled data have better performances?",
      "votes": null
    },
    {
      "id": "268455",
      "postDate": "01/14/2018 14:32:31",
      "content": "<p>Hi Paul</p>\n\n<p>If I remember right, yes, re-labeling did a better job than scala label (~0.0015 gain).</p>",
      "rawMarkdown": "Hi Paul\n\nIf I remember right, yes, re-labeling did a better job than scala label (~0.0015 gain).",
      "votes": null
    },
    {
      "id": "269326",
      "postDate": "01/16/2018 16:26:29",
      "content": "<p>Thank you very much for sharing the useful solution. </p>\n\n<ul>\n<li><p>I would appreciate if you could explain the full meaning of \"each\" new features you extracted and formula used to create them.</p></li>\n<li><p>May I ask you about the accuracy of your models when tested on test data?</p></li>\n</ul>",
      "rawMarkdown": "Thank you very much for sharing the useful solution. \n\n- I would appreciate if you could explain the full meaning of \"each\" new features you extracted and formula used to create them.\n\n- May I ask you about the accuracy of your models when tested on test data?",
      "votes": null
    },
    {
      "id": "291024",
      "postDate": "03/05/2018 13:32:33",
      "content": "<p>hello,  would you be able to provide a brief description of each feature that you have created? thank you</p>",
      "rawMarkdown": "hello,  would you be able to provide a brief description of each feature that you have created? thank you",
      "votes": null
    },
    {
      "id": "333109",
      "postDate": "05/24/2018 12:19:14",
      "content": "<p>could you explain the reason why payment_method_id is so important? </p>",
      "rawMarkdown": "could you explain the reason why payment_method_id is so important?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 260682,
      "author_name": "andyor",
      "author_url": "",
      "post_date": "12/20/2017 18:04:09",
      "content": "<p>Hi, </p>\n\n<p>Thank you for sharing the solution. You have build some interesting features. Will you please elaborate on the features as \"last_no_is_churn\"? These features shows significant correlation in the model.</p>",
      "votes": null,
      "replies": [
        {
          "id": 260832,
          "author_name": "infinitewing",
          "author_url": "",
          "post_date": "12/21/2017 02:33:30",
          "content": "<p>Hi, Aniket, </p>\n\n<p>If one member had membership expire five times in the past, for example 201603, 201604, 201605, 201606, and 201607, \"last_1_is_churn\" means did this member churn in 201607 or not; \"last_2_is_churn\" means did this member churn in 201606 or not; and so on.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 260892,
          "author_name": "andyor",
          "author_url": "",
          "post_date": "12/21/2017 05:48:26",
          "content": "<p>Thank you for the explanation. It is impressive to learn this kind of features from the expiration columns. It is no wonder that your solution finished so higher in the competition.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 268432,
      "author_name": "paullo0106",
      "author_url": "",
      "post_date": "01/14/2018 13:05:08",
      "content": "<p>Congrats, InfiniteWing! On the re-labeling, do those models based on re-labeled data have better performances?</p>",
      "votes": null,
      "replies": [
        {
          "id": 268455,
          "author_name": "infinitewing",
          "author_url": "",
          "post_date": "01/14/2018 14:32:31",
          "content": "<p>Hi Paul</p>\n\n<p>If I remember right, yes, re-labeling did a better job than scala label (~0.0015 gain).</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 269326,
      "author_name": "billiazz",
      "author_url": "",
      "post_date": "01/16/2018 16:26:29",
      "content": "<p>Thank you very much for sharing the useful solution. </p>\n\n<ul>\n<li><p>I would appreciate if you could explain the full meaning of \"each\" new features you extracted and formula used to create them.</p></li>\n<li><p>May I ask you about the accuracy of your models when tested on test data?</p></li>\n</ul>",
      "votes": null,
      "replies": []
    },
    {
      "id": 291024,
      "author_name": "lolass",
      "author_url": "",
      "post_date": "03/05/2018 13:32:33",
      "content": "<p>hello,  would you be able to provide a brief description of each feature that you have created? thank you</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 333109,
      "author_name": "nicpado",
      "author_url": "",
      "post_date": "05/24/2018 12:19:14",
      "content": "<p>could you explain the reason why payment_method_id is so important? </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "260458": "Hi, congrats to the winners, and thanks everyone. Here is the brief description of my solution:\n<br><br>\n### 1. Re-labeling\nAccording to [this post](https://www.kaggle.com/c/kkbox-churn-prediction-challenge/discussion/45991), the training sets posted for the contest differed greatly to the label generated by scala code. In my solution, one of my model use the scala label, and the other model use the label generated by [my python script](https://github.com/InfiniteWing/Kaggle/blob/master/KKBOX%20churn/code/labeler_v2_final.py)(I did not optimize the code yet). \n<br><br>\n### 2. Features\nHere is the list of my features, feel free to ask me if the feature name is hard to understand:\n\nP.S. For 201702 churner(whose membership expired in 201702), I trace the log which is between 20170101 to 20170131.\n\n['payment_method_id', 'payment_plan_days', 'plan_list_price', 'actual_amount_paid', 'is_auto_renew', 'last_1_is_churn', 'last_2_is_churn', 'last_3_is_churn', 'last_4_is_churn', 'last_5_is_churn', 'churn_rate', 'churn_count', 'transaction_count', 'discount', 'is_discount', 'amt_per_day', 'num_25_mean', 'num_50_mean', 'num_75_mean', 'num_985_mean', 'num_100_mean', 'num_unq_mean', 'total_secs_mean', 'num_25_sum', 'num_50_sum', 'num_75_sum', 'num_985_sum', 'num_100_sum', 'num_unq_sum', 'total_secs_sum', 'count', 'city', 'bd', 'gender', 'registered_via', 'registration_init_time']\n<br><br>\n### 3. Models\nI use xgboost, lightGBM, and CatBoost to predict churner, and then simply average the prediction. Here is the feature importance of lightGBM model.\n\n![feature importance of lightGBM model][1]\n\n\n  [1]: https://kaggle2.blob.core.windows.net/forum-message-attachments/260458/8095/feature_importance_0.png\n\nThanks, and see you next competition.",
    "260682": "Hi, \n\nThank you for sharing the solution. You have build some interesting features. Will you please elaborate on the features as \"last_no_is_churn\"? These features shows significant correlation in the model.",
    "260832": "Hi, Aniket, \n\nIf one member had membership expire five times in the past, for example 201603, 201604, 201605, 201606, and 201607, \"last_1_is_churn\" means did this member churn in 201607 or not; \"last_2_is_churn\" means did this member churn in 201606 or not; and so on.",
    "260892": "Thank you for the explanation. It is impressive to learn this kind of features from the expiration columns. It is no wonder that your solution finished so higher in the competition.",
    "268432": "Congrats, InfiniteWing! On the re-labeling, do those models based on re-labeled data have better performances?",
    "268455": "Hi Paul\n\nIf I remember right, yes, re-labeling did a better job than scala label (~0.0015 gain).",
    "269326": "Thank you very much for sharing the useful solution. \n\n- I would appreciate if you could explain the full meaning of \"each\" new features you extracted and formula used to create them.\n\n- May I ask you about the accuracy of your models when tested on test data?",
    "291024": "hello,  would you be able to provide a brief description of each feature that you have created? thank you",
    "333109": "could you explain the reason why payment_method_id is so important?"
  },
  "source": "meta"
}