{
  "id": 232687,
  "title": "14th place solution",
  "content": "<p>Congratulations to the winners, to all the players and thanks to Kaggle and all the organizers for this tabular actuarial challenge ! And thank you to those who shared some tricks during the challenge !</p>\n<h1>14th place solution</h1>\n<h2>3 <em>magic</em> features :</h2>\n<ul>\n<li>a topic modeling with LDA implementation for ClaimDescription. Thanks to <a href=\"https://www.kaggle.com/tanguypledel\" target=\"_blank\">@tanguypledel</a> for his <a href=\"https://www.kaggle.com/tanguypledel/topic-modeling-lda-implementation\" target=\"_blank\">notebook</a>. My best CV results were with only 6 topics for LGBM and CatBoost and only 12 topics for NN.</li>\n<li>a ClaimDescription score. I made a ridge regression to explain a logscale of UltimateClaimCost with ClaimDescription only. UltimateClaimCost was scaled by year of accident to take into account inflation. Duplicates words, english stop words etc. were dropped from ClaimDescription defore. The value of this score became a feature in my LGBM, CatBoost, NN…</li>\n<li>a frequency encoding of initial claim cost </li>\n</ul>\n<h2>Several models :</h2>\n<ul>\n<li>LGBM : only 20 leaves, and less than 800 estimators (LR : 0.01), to avoid overfitting</li>\n<li>CatBoost (very interesting for categorical features) : with all default parameters except learning rate : 0.1 (less than 150 estimators)</li>\n<li>a small NN (3 dense layers, and 1 dropout layer before last dense layer, with 10% dropout rate to avoid overfitting), with a logscale of UltimateClaimCost as target (scaling by year of accident to take into account inflation)</li>\n</ul>\n<p>My best CV result was a <strong>blend</strong> of Catboost, LGBM and NN (and no extratree despite of my <a href=\"https://www.kaggle.com/adaubas/why-not-to-blend-catboost-extratree-and-a-nn\" target=\"_blank\">notebook</a> published in january). I had a worse CV with a single NN than a single CatBoost or a single LGBM. But NN model in blend improve my CV (and not extratree model, sorry !)</p>\n<h1>What didn't work for me (no CV improvement)</h1>\n<ul>\n<li>Huber loss instead of RMSE loss</li>\n<li>extratrees, gamma regressions, knn,</li>\n<li>more feature engineering on initial claim costs : I tried to make classes of amounts, with no success</li>\n<li>SMOTE or other techniques for imbalanced data. Claims with extrem costs where imbalanced, there were only one extrem claim in train set, and another one in the part of the test set for public leaderboard. We couldn't know how many extrem claims there would be in test set for private leaderboard : None ? 1 ? 2 ? Answer is 0.</li>\n<li>compute the ClaimDecription score on residuals from a model with all features except  ClaimDescription</li>\n<li>catboost fine tuning, NN fine tuning (i had dirty training &amp; valid curves)</li>\n</ul>\n<p>I didn't trust public leaderboard, and I took many times to build robust pipelines (without target leakage) and a clean CV. <br>\nI had only one submission with a RMSE under 30 000 on the public LB ; it was my best CV.<br>\nI'm proud to be the only person in the 20 first places to have less than 10 submissions on public leaderboard. <br>\nI'm glad to have tried a NN on tabular data, I've learned a lot about text mining and how to describe data with seaborn plots.</p>\n<p>Hope to see you soon in an other challenge !<br>\nAlexandre</p>",
  "comments": [
    {
      "id": 1275062,
      "author_name": "Tanguy Pledel",
      "author_url": "",
      "post_date": "2021-04-15T21:36:35.393000",
      "content": "<p>Hey Alexandre, I am very happy to see that my work help you.<br>\nCongratulations for your amazing performance !</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1274102,
      "author_name": "teehoong",
      "author_url": "",
      "post_date": "2021-04-15T01:54:40.260000",
      "content": "<p>Thank you for sharing!<br>\nAmazing under 10 submissions! Am very interested in how you made your local CV pipeline that robust!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1274103,
          "author_name": "teehoong",
          "author_url": "",
          "post_date": "2021-04-15T01:55:43.007000",
          "content": "<p>Especially so since I'm guessing your 2nd magic feature is very prone to target leakage right?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1274244,
          "author_name": "aldparis",
          "author_url": "",
          "post_date": "2021-04-15T06:15:59.010000",
          "content": "<p>Thank you for your comment and your question.</p>\n<blockquote>\n  <p>I'm guessing your 2nd magic feature is very prone to target leakage</p>\n</blockquote>\n<p>I don't think so, but maybe I'm wrong.</p>\n<p>I have created the ClaimDescription score like a way of data reduction : instead of a text, or instead of many one hot text features, i had only a continuous feature with this score, usefull.</p>\n<p>This ClaimDescription score was build separately for each fold <strong>only on training sets during CV</strong> in a pipeline of transformations, and before LGBM or catboost or NN trainings. <br>\nThere would be target leakage if i had trained this ClaimDescription score on training sets <strong>and on valid sets</strong> before training LGBM, NN etc. in CV , but I didn't.<br>\nAnd those transformers, transformed later valid samples (and test samples of course) just before predictions. Those valid and test samples were not used during training of transformers.</p>\n<p>Also, if <strong>CV RMSE</strong> (RMSE on valid sets) is lower on my final LGBM when I'm using the ClaimDescriptionScore feature, than when I'm not, <strong>I'm almost certain that this ClaimDescription Score will improve the LGBM RMSE on the PRIVATE leaderboard</strong>. <br>\n<strong>Never mind if the RMSE is higher on PUBLIC leaderboard</strong> ; anyway, I didn't submit this little LGBM difference on public LB.</p>\n<p>Since the beginning of the challenge, I've made all my decisions by this way (number of topics with LDA implementation etc.). That's why I had submitted so few. At the end of the challenge, all my new CV RMSE on new ideas told me that those new ideas shouldn't improve my RMSE on unseen private leaderboard, so I didn't submitted them.<br>\nThe <a href=\"https://www.kaggle.com/adaubas/why-not-to-blend-catboost-extratree-and-a-nn\" target=\"_blank\">notebook</a> published during january is like that.</p>\n<p>Thanks to scikit-learn for transformer classes and pipeline, there are very powerfull tools to make decisions : a <a href=\"https://scikit-learn.org/stable/modules/compose.html#pipeline-chaining-estimators\" target=\"_blank\">link</a>. </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1274310,
          "author_name": "teehoong",
          "author_url": "",
          "post_date": "2021-04-15T07:20:53.147000",
          "content": "<p>Thank you Ald. 👍 </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1275331,
      "author_name": "Abhishek252",
      "author_url": "",
      "post_date": "2021-04-16T07:26:55.110000",
      "content": "<p>amazingly done buddy!</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "comment_count": 6,
  "messages": [
    {
      "id": 1274001,
      "postDate": "2021-04-14T21:47:32.963Z",
      "content": "<p>Congratulations to the winners, to all the players and thanks to Kaggle and all the organizers for this tabular actuarial challenge ! And thank you to those who shared some tricks during the challenge !</p>\n<h1>14th place solution</h1>\n<h2>3 <em>magic</em> features :</h2>\n<ul>\n<li>a topic modeling with LDA implementation for ClaimDescription. Thanks to <a href=\"https://www.kaggle.com/tanguypledel\" target=\"_blank\">@tanguypledel</a> for his <a href=\"https://www.kaggle.com/tanguypledel/topic-modeling-lda-implementation\" target=\"_blank\">notebook</a>. My best CV results were with only 6 topics for LGBM and CatBoost and only 12 topics for NN.</li>\n<li>a ClaimDescription score. I made a ridge regression to explain a logscale of UltimateClaimCost with ClaimDescription only. UltimateClaimCost was scaled by year of accident to take into account inflation. Duplicates words, english stop words etc. were dropped from ClaimDescription defore. The value of this score became a feature in my LGBM, CatBoost, NN…</li>\n<li>a frequency encoding of initial claim cost </li>\n</ul>\n<h2>Several models :</h2>\n<ul>\n<li>LGBM : only 20 leaves, and less than 800 estimators (LR : 0.01), to avoid overfitting</li>\n<li>CatBoost (very interesting for categorical features) : with all default parameters except learning rate : 0.1 (less than 150 estimators)</li>\n<li>a small NN (3 dense layers, and 1 dropout layer before last dense layer, with 10% dropout rate to avoid overfitting), with a logscale of UltimateClaimCost as target (scaling by year of accident to take into account inflation)</li>\n</ul>\n<p>My best CV result was a <strong>blend</strong> of Catboost, LGBM and NN (and no extratree despite of my <a href=\"https://www.kaggle.com/adaubas/why-not-to-blend-catboost-extratree-and-a-nn\" target=\"_blank\">notebook</a> published in january). I had a worse CV with a single NN than a single CatBoost or a single LGBM. But NN model in blend improve my CV (and not extratree model, sorry !)</p>\n<h1>What didn't work for me (no CV improvement)</h1>\n<ul>\n<li>Huber loss instead of RMSE loss</li>\n<li>extratrees, gamma regressions, knn,</li>\n<li>more feature engineering on initial claim costs : I tried to make classes of amounts, with no success</li>\n<li>SMOTE or other techniques for imbalanced data. Claims with extrem costs where imbalanced, there were only one extrem claim in train set, and another one in the part of the test set for public leaderboard. We couldn't know how many extrem claims there would be in test set for private leaderboard : None ? 1 ? 2 ? Answer is 0.</li>\n<li>compute the ClaimDecription score on residuals from a model with all features except  ClaimDescription</li>\n<li>catboost fine tuning, NN fine tuning (i had dirty training &amp; valid curves)</li>\n</ul>\n<p>I didn't trust public leaderboard, and I took many times to build robust pipelines (without target leakage) and a clean CV. <br>\nI had only one submission with a RMSE under 30 000 on the public LB ; it was my best CV.<br>\nI'm proud to be the only person in the 20 first places to have less than 10 submissions on public leaderboard. <br>\nI'm glad to have tried a NN on tabular data, I've learned a lot about text mining and how to describe data with seaborn plots.</p>\n<p>Hope to see you soon in an other challenge !<br>\nAlexandre</p>",
      "rawMarkdown": "Congratulations to the winners, to all the players and thanks to Kaggle and all the organizers for this tabular actuarial challenge ! And thank you to those who shared some tricks during the challenge !\n\n# 14th place solution\n## 3 *magic* features :\n- a topic modeling with LDA implementation for ClaimDescription. Thanks to @tanguypledel for his [notebook](https://www.kaggle.com/tanguypledel/topic-modeling-lda-implementation). My best CV results were with only 6 topics for LGBM and CatBoost and only 12 topics for NN.\n- a ClaimDescription score. I made a ridge regression to explain a logscale of UltimateClaimCost with ClaimDescription only. UltimateClaimCost was scaled by year of accident to take into account inflation. Duplicates words, english stop words etc. were dropped from ClaimDescription defore. The value of this score became a feature in my LGBM, CatBoost, NN...\n- a frequency encoding of initial claim cost \n\n## Several models :\n- LGBM : only 20 leaves, and less than 800 estimators (LR : 0.01), to avoid overfitting\n- CatBoost (very interesting for categorical features) : with all default parameters except learning rate : 0.1 (less than 150 estimators)\n- a small NN (3 dense layers, and 1 dropout layer before last dense layer, with 10% dropout rate to avoid overfitting), with a logscale of UltimateClaimCost as target (scaling by year of accident to take into account inflation)\n\nMy best CV result was a **blend** of Catboost, LGBM and NN (and no extratree despite of my [notebook](https://www.kaggle.com/adaubas/why-not-to-blend-catboost-extratree-and-a-nn) published in january). I had a worse CV with a single NN than a single CatBoost or a single LGBM. But NN model in blend improve my CV (and not extratree model, sorry !)\n\t\n\t\n# What didn't work for me (no CV improvement)\n- Huber loss instead of RMSE loss\n- extratrees, gamma regressions, knn,\n- more feature engineering on initial claim costs : I tried to make classes of amounts, with no success\n- SMOTE or other techniques for imbalanced data. Claims with extrem costs where imbalanced, there were only one extrem claim in train set, and another one in the part of the test set for public leaderboard. We couldn't know how many extrem claims there would be in test set for private leaderboard : None ? 1 ? 2 ? Answer is 0.\n- compute the ClaimDecription score on residuals from a model with all features except  ClaimDescription\n- catboost fine tuning, NN fine tuning (i had dirty training & valid curves)\n\n\nI didn't trust public leaderboard, and I took many times to build robust pipelines (without target leakage) and a clean CV. \nI had only one submission with a RMSE under 30 000 on the public LB ; it was my best CV.\nI'm proud to be the only person in the 20 first places to have less than 10 submissions on public leaderboard. \nI'm glad to have tried a NN on tabular data, I've learned a lot about text mining and how to describe data with seaborn plots.\n\nHope to see you soon in an other challenge !\nAlexandre",
      "votes": 11
    },
    {
      "id": 1275062,
      "postDate": "2021-04-15T21:36:35.393Z",
      "content": "<p>Hey Alexandre, I am very happy to see that my work help you.<br>\nCongratulations for your amazing performance !</p>",
      "rawMarkdown": "Hey Alexandre, I am very happy to see that my work help you.\nCongratulations for your amazing performance !",
      "votes": 1
    },
    {
      "id": 1274102,
      "postDate": "2021-04-15T01:54:40.260Z",
      "content": "<p>Thank you for sharing!<br>\nAmazing under 10 submissions! Am very interested in how you made your local CV pipeline that robust!</p>",
      "rawMarkdown": "Thank you for sharing!\nAmazing under 10 submissions! Am very interested in how you made your local CV pipeline that robust!",
      "votes": 1,
      "replies": [
        {
          "id": 1274103,
          "postDate": "2021-04-15T01:55:43.007Z",
          "content": "<p>Especially so since I'm guessing your 2nd magic feature is very prone to target leakage right?</p>",
          "rawMarkdown": "Especially so since I'm guessing your 2nd magic feature is very prone to target leakage right?",
          "votes": 1
        },
        {
          "id": 1274244,
          "postDate": "2021-04-15T06:15:59.010Z",
          "content": "<p>Thank you for your comment and your question.</p>\n<blockquote>\n  <p>I'm guessing your 2nd magic feature is very prone to target leakage</p>\n</blockquote>\n<p>I don't think so, but maybe I'm wrong.</p>\n<p>I have created the ClaimDescription score like a way of data reduction : instead of a text, or instead of many one hot text features, i had only a continuous feature with this score, usefull.</p>\n<p>This ClaimDescription score was build separately for each fold <strong>only on training sets during CV</strong> in a pipeline of transformations, and before LGBM or catboost or NN trainings. <br>\nThere would be target leakage if i had trained this ClaimDescription score on training sets <strong>and on valid sets</strong> before training LGBM, NN etc. in CV , but I didn't.<br>\nAnd those transformers, transformed later valid samples (and test samples of course) just before predictions. Those valid and test samples were not used during training of transformers.</p>\n<p>Also, if <strong>CV RMSE</strong> (RMSE on valid sets) is lower on my final LGBM when I'm using the ClaimDescriptionScore feature, than when I'm not, <strong>I'm almost certain that this ClaimDescription Score will improve the LGBM RMSE on the PRIVATE leaderboard</strong>. <br>\n<strong>Never mind if the RMSE is higher on PUBLIC leaderboard</strong> ; anyway, I didn't submit this little LGBM difference on public LB.</p>\n<p>Since the beginning of the challenge, I've made all my decisions by this way (number of topics with LDA implementation etc.). That's why I had submitted so few. At the end of the challenge, all my new CV RMSE on new ideas told me that those new ideas shouldn't improve my RMSE on unseen private leaderboard, so I didn't submitted them.<br>\nThe <a href=\"https://www.kaggle.com/adaubas/why-not-to-blend-catboost-extratree-and-a-nn\" target=\"_blank\">notebook</a> published during january is like that.</p>\n<p>Thanks to scikit-learn for transformer classes and pipeline, there are very powerfull tools to make decisions : a <a href=\"https://scikit-learn.org/stable/modules/compose.html#pipeline-chaining-estimators\" target=\"_blank\">link</a>. </p>",
          "rawMarkdown": "Thank you for your comment and your question.\n>I'm guessing your 2nd magic feature is very prone to target leakage\n\nI don't think so, but maybe I'm wrong.\n\nI have created the ClaimDescription score like a way of data reduction : instead of a text, or instead of many one hot text features, i had only a continuous feature with this score, usefull.\n\nThis ClaimDescription score was build separately for each fold **only on training sets during CV** in a pipeline of transformations, and before LGBM or catboost or NN trainings. \nThere would be target leakage if i had trained this ClaimDescription score on training sets **and on valid sets** before training LGBM, NN etc. in CV , but I didn't.\nAnd those transformers, transformed later valid samples (and test samples of course) just before predictions. Those valid and test samples were not used during training of transformers.\n\nAlso, if **CV RMSE** (RMSE on valid sets) is lower on my final LGBM when I'm using the ClaimDescriptionScore feature, than when I'm not, **I'm almost certain that this ClaimDescription Score will improve the LGBM RMSE on the PRIVATE leaderboard**. \n**Never mind if the RMSE is higher on PUBLIC leaderboard** ; anyway, I didn't submit this little LGBM difference on public LB.\n\nSince the beginning of the challenge, I've made all my decisions by this way (number of topics with LDA implementation etc.). That's why I had submitted so few. At the end of the challenge, all my new CV RMSE on new ideas told me that those new ideas shouldn't improve my RMSE on unseen private leaderboard, so I didn't submitted them.\nThe [notebook](https://www.kaggle.com/adaubas/why-not-to-blend-catboost-extratree-and-a-nn) published during january is like that.\n\nThanks to scikit-learn for transformer classes and pipeline, there are very powerfull tools to make decisions : a [link](https://scikit-learn.org/stable/modules/compose.html#pipeline-chaining-estimators). ",
          "votes": 2
        },
        {
          "id": 1274310,
          "postDate": "2021-04-15T07:20:53.147Z",
          "content": "<p>Thank you Ald. 👍 </p>",
          "rawMarkdown": "Thank you Ald. 👍 \n",
          "votes": 1
        }
      ]
    },
    {
      "id": 1275331,
      "postDate": "2021-04-16T07:26:55.110Z",
      "content": "<p>amazingly done buddy!</p>",
      "rawMarkdown": "amazingly done buddy!"
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T19:14:48Z",
  "competition_id": 24764,
  "competition_slug": "actuarial-loss-estimation",
  "team_id": 6113538,
  "solution_url": "/competitions/actuarial-loss-estimation/writeups/aldparis-14th-place-solution"
}