{
  "id": 566527,
  "title": "Rank 120 approach - simplicity is the name of the game!",
  "content": "<p>Hello all,</p>\n<p>Firstly, I wish to extend sincere thanks to Kaggle and CIBMTR for a very accessible tabular competition. I also wish to thank the contributors in the public forums for such a generous contribution through Dec2024-Mar2025! In my 3 years of Kaggle competitions, I have witnessed very few competitions with such a great public sharing across the forums! Sincere thanks to all the contributors! Also, special thanks to <a href=\"https://www.kaggle.com/benjenkins96\" target=\"_blank\">@benjenkins96</a> and <a href=\"https://www.kaggle.com/meetbabariya\" target=\"_blank\">@meetbabariya</a> for the team-up, we have a silver here!</p>\n<p>My approach for the competition focused on a simple blend of boosted tree and NN models with and without the classifier masking public kernel. I used selective public work from across the forums, carefully modifying the ideas propitiated with private work and associated adjustments as below-</p>\n<h1>Model pipeline architecture</h1>\n<p>My model pipeline for the assignment can be summarized as below-</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8273630%2F59d069a2cccf5bf496d2d9fb02127c25%2FCIBMTR.png?generation=1741205788430128&amp;alt=media\" alt=\"\"></p>\n<h1>Preprocessing</h1>\n<h2>Feature engineering</h2>\n<ul>\n<li>Almost negligible, competition features were sufficient in entirety</li>\n<li>Used <code>row-na = df.isna().sum(axis=1)</code> as an extra feature </li>\n</ul>\n<h2>Failed Feature Engineering experiments</h2>\n<ul>\n<li>Target encoder 😀</li>\n<li>MEstimate encoder</li>\n<li>Bigram and trigram interactions </li>\n<li>Converting all features to string/ text type (this is commonly done in playground competitions)</li>\n<li>HLA feature adjustment (taken from public work)</li>\n<li>PCA (adapted from Yunbase)</li>\n<li>Age in years and age in days (separating integer and decimal from age)</li>\n</ul>\n<h2>Target variable choices</h2>\n<ul>\n<li>Kaplan Meier Fitter (most stable and offered the best CV-LB)</li>\n<li>Nelson Aelen Fitter (fitted well with the best CV but scored lower on the LB)</li>\n<li>BFH Fitter (moderate CV and LB scores, but scores were always in sync)</li>\n<li>Log efs-time (used in public NN models)</li>\n</ul>\n<h2>Failed target experiments</h2>\n<table>\n<thead>\n<tr>\n<th>Target scheme</th>\n<th>Issues faced</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Weibull fitter</td>\n<td>* Very low single model CV and high standard deviation across folds</td>\n</tr>\n<tr>\n<td>Log-logistic</td>\n<td>* Very low single model CV for boosted trees and NN models</td>\n</tr>\n<tr>\n<td>Log-normal</td>\n<td>* Very low single model CV for boosted trees and NN models</td>\n</tr>\n</tbody>\n</table>\n<h2>CV-scheme</h2>\n<p>I used a variety of CV schemes to varying degrees of success, but decided to opt for 10-fold (simple K-fold)<br>\n<code>cv = KFold(random_state = 42, n_splits = 10, shuffle = True)</code></p>\n<h2>Failed CV experiments</h2>\n<table>\n<thead>\n<tr>\n<th>CV scheme</th>\n<th>Issues faced</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Stratified Kfold - <br> race group</td>\n<td>* Single models had a greater CV than kfold and CV-LB was good, but ensemble CV-LB went awry</td>\n</tr>\n<tr>\n<td>Stratified Kfold - <br> race group + year-hct</td>\n<td>* Single model CV-LB were not in sync after a point</td>\n</tr>\n<tr>\n<td>Stratified Kfold - <br> race group + year-hct + efs</td>\n<td>* Single model CV-LB were not in sync, especially for the Autogluon model</td>\n</tr>\n</tbody>\n</table>\n<h1><strong>Model pipeline</strong></h1>\n<p>Given below are the CV scores across component models -</p>\n<table>\n<thead>\n<tr>\n<th>Model Label</th>\n<th>CV score <br> no mask</th>\n<th>LB score <br> no mask</th>\n<th>CV score <br> mask</th>\n<th>LB score <br> mask</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>LITNN</td>\n<td>0.68269241</td>\n<td>0.688</td>\n<td>0.68351879</td>\n<td>0.689</td>\n</tr>\n<tr>\n<td>TABM</td>\n<td>0.68104054</td>\n<td>0.685</td>\n<td>0.68151639</td>\n<td>0.685</td>\n</tr>\n<tr>\n<td>L1-AG</td>\n<td>0.68051078</td>\n<td>0.687</td>\n<td>0.68136013</td>\n<td>0.688</td>\n</tr>\n<tr>\n<td>L1-ML</td>\n<td>0.6684 - 0.6792</td>\n<td>0.673 - 0.685</td>\n<td>0.6704 - 0.6810</td>\n<td>0.674 - 0.685</td>\n</tr>\n<tr>\n<td>L2-ML</td>\n<td>0.68422683</td>\n<td>0.689</td>\n<td>0.68554</td>\n<td>0.689</td>\n</tr>\n<tr>\n<td>L2-LAMA</td>\n<td>0.67890052</td>\n<td>0.688</td>\n<td>0.681053</td>\n<td>0.689</td>\n</tr>\n<tr>\n<td>XGBR Sample Weights</td>\n<td>0.68174912 <br> 0.68046331</td>\n<td>0.686 <br> 0.685</td>\n<td>0.68267643</td>\n<td>0.686 <br> 0.686</td>\n</tr>\n</tbody>\n</table>\n<h2>Key notes</h2>\n<ul>\n<li>Early stopping worked for me across boosted trees. Not using this reduced the CV score for me across models </li>\n<li>Training on CPU provided a better CV score than training on GPU, especially for Catboost</li>\n<li>I used target separators as the ones below-<br>\n<code>np.where( ytrain.efs == 1, ytrain[\"KMF\"] + separation_factor, ytrain[\"KMF\"])</code></li>\n<li>Using no separation (separation = 0) yielded a lower CV score for me. Separation constant of <code>0.10 and 0.15</code>were most productive for me</li>\n<li>The XGB classifier mask upgraded the CV across model components but failed to improve the leaderboard almost throughout</li>\n<li>Almost all feature engineering ideas were futile - using the base features as is helped a lot</li>\n<li>Using the starting features and OOF features from across boosted tree models in a separate boosted tree stacking L2 model helped a lot with the CV and a bit with the leaderboard as well</li>\n<li>Stacking a NN model with boosted tree OOF features helped with the LB but not the CV (gap between CV and LB increased from 0.006 to 0.009)</li>\n<li>Stacking a boosted tree model with TABM model OOF features also increased the gap between CV and LB and was precluded </li>\n</ul>\n<h1>Final ensemble and post-processing</h1>\n<ul>\n<li>I used the public XGBclassifier and masked the predictions as illustrated in the kernel (predicted efs == 1 cases and adjusted the predictions upward). Instead of using a single weight across all model choices, I resorted to tuning <strong>each model by a suitable separator according to the optimal CV scores</strong></li>\n<li>I used a ridge model as a base for the ensemble (though this idea did not work on the leaderboard with scores 0.686-0.687)</li>\n<li>I realized that using negative weights across models could be tested here - I tuned weights manually post the ridge and improved the CV score thereby with a suitable weight set</li>\n<li>My alternative submission was the same model structure without the masking structure </li>\n</ul>\n<table>\n<thead>\n<tr>\n<th>Submission details</th>\n<th>CV score</th>\n<th>Public leaderboard</th>\n<th>Private Leaderboard</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Model structure without masking but positive weights across single models</td>\n<td>0.685564</td>\n<td>0.690</td>\n<td>0.693</td>\n</tr>\n<tr>\n<td>Model structure without masking and any weight across the blend - <strong>final</strong></td>\n<td>0.686844</td>\n<td>0.691</td>\n<td>0.693</td>\n</tr>\n<tr>\n<td>Model structure with masking and any weight across the blend - <strong>final</strong></td>\n<td>0.6878442</td>\n<td>0.689</td>\n<td>0.692</td>\n</tr>\n<tr>\n<td>Model structure with masking for boosted trees only and any weight across the blend</td>\n<td>0.6878162</td>\n<td>0.689</td>\n<td>0.692</td>\n</tr>\n</tbody>\n</table>\n<h1>Excluded models from the final ensemble</h1>\n<table>\n<thead>\n<tr>\n<th>Model choice</th>\n<th>Exclusion reason</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>TABM RMSE loss function</td>\n<td>Good CV-LB with single model but never fitted well in the ensemble - using it almost always reduced the CV score</td>\n</tr>\n<tr>\n<td>TABM MAE loss function</td>\n<td>Moderate CV-LB with single model but never fitted well in the ensemble - using it almost always reduced the CV score</td>\n</tr>\n<tr>\n<td>MLP RMSE loss function</td>\n<td>Low CV score and excluded from single models</td>\n</tr>\n<tr>\n<td>Boosted trees with MAE metric and loss function optimization</td>\n<td>Low CV score and excluded from single models</td>\n</tr>\n</tbody>\n</table>\n<h1>Final thoughts and remarks</h1>\n<p>Wishing you the best for the future and happy learning! All the best for the upcoming Playground episodes and featured competitions as well!</p>\n<p>Best regards,<br>\nRavi Ramakrishnan</p>",
  "comments": [
    {
      "id": 3217270,
      "author_name": "PACESETTER55",
      "author_url": "",
      "post_date": "2025-06-04T18:45:14.193000",
      "content": "<p>Congratulations!! can you share your notebook</p>",
      "votes": 1,
      "replies": [
        {
          "id": 3217282,
          "author_name": "Ravi Ramakrishnan",
          "author_url": "",
          "post_date": "2025-06-04T19:19:38.030000",
          "content": "<p>This is not one but a collection of more than 50 scripts <a href=\"https://www.kaggle.com/pacesetter55\" target=\"_blank\">@pacesetter55</a> </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 3142653,
      "author_name": "Andreas Bisiadis",
      "author_url": "",
      "post_date": "2025-03-06T15:08:03.867000",
      "content": "<p><a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a> Congrats for your team's solution and experiments; the latter are similar to my own private experiments to an extent. </p>\n<p>It's a pity (for me) that I missed the <code>BreslowFlemingHarringtonFitter</code> target, as GBDT models with this target are on-par with Kaplan-Meier and Nelson-Aalen; I could have a 0.001 boost for my ensemble and perhaps reaching 0.694 LB, but I am satisfied with a silver medal. </p>\n<p>Best of luck for the next competitions!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 3146196,
          "author_name": "Ravi Ramakrishnan",
          "author_url": "",
          "post_date": "2025-03-10T16:17:15.300000",
          "content": "<p>Thanks man <a href=\"https://www.kaggle.com/andreasbis\" target=\"_blank\">@andreasbis</a> <br>\nSee you around my friend!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 3142107,
      "author_name": "Meet Babariya",
      "author_url": "",
      "post_date": "2025-03-06T05:13:34.193000",
      "content": "<p>Congrats! It's been great working with you on this competition. Appreciate all your insights and effort. </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 3141833,
      "author_name": "Sheikh Muhammad Abdullah",
      "author_url": "",
      "post_date": "2025-03-06T00:17:20.067000",
      "content": "<p><a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a> Congratulations! I knew you would escape the shakeup. Amazing solution!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 3141864,
          "author_name": "Ravi Ramakrishnan",
          "author_url": "",
          "post_date": "2025-03-06T00:45:19.130000",
          "content": "<p>Same for you - I think we thought alike, from our approaches (based on public work of course) and ended up at the same place <a href=\"https://www.kaggle.com/abdmental01\" target=\"_blank\">@abdmental01</a>!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "comment_count": 7,
  "messages": [
    {
      "id": 3141821,
      "postDate": "2025-03-06T00:11:14.087Z",
      "content": "<p>Hello all,</p>\n<p>Firstly, I wish to extend sincere thanks to Kaggle and CIBMTR for a very accessible tabular competition. I also wish to thank the contributors in the public forums for such a generous contribution through Dec2024-Mar2025! In my 3 years of Kaggle competitions, I have witnessed very few competitions with such a great public sharing across the forums! Sincere thanks to all the contributors! Also, special thanks to <a href=\"https://www.kaggle.com/benjenkins96\" target=\"_blank\">@benjenkins96</a> and <a href=\"https://www.kaggle.com/meetbabariya\" target=\"_blank\">@meetbabariya</a> for the team-up, we have a silver here!</p>\n<p>My approach for the competition focused on a simple blend of boosted tree and NN models with and without the classifier masking public kernel. I used selective public work from across the forums, carefully modifying the ideas propitiated with private work and associated adjustments as below-</p>\n<h1>Model pipeline architecture</h1>\n<p>My model pipeline for the assignment can be summarized as below-</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8273630%2F59d069a2cccf5bf496d2d9fb02127c25%2FCIBMTR.png?generation=1741205788430128&amp;alt=media\" alt=\"\"></p>\n<h1>Preprocessing</h1>\n<h2>Feature engineering</h2>\n<ul>\n<li>Almost negligible, competition features were sufficient in entirety</li>\n<li>Used <code>row-na = df.isna().sum(axis=1)</code> as an extra feature </li>\n</ul>\n<h2>Failed Feature Engineering experiments</h2>\n<ul>\n<li>Target encoder 😀</li>\n<li>MEstimate encoder</li>\n<li>Bigram and trigram interactions </li>\n<li>Converting all features to string/ text type (this is commonly done in playground competitions)</li>\n<li>HLA feature adjustment (taken from public work)</li>\n<li>PCA (adapted from Yunbase)</li>\n<li>Age in years and age in days (separating integer and decimal from age)</li>\n</ul>\n<h2>Target variable choices</h2>\n<ul>\n<li>Kaplan Meier Fitter (most stable and offered the best CV-LB)</li>\n<li>Nelson Aelen Fitter (fitted well with the best CV but scored lower on the LB)</li>\n<li>BFH Fitter (moderate CV and LB scores, but scores were always in sync)</li>\n<li>Log efs-time (used in public NN models)</li>\n</ul>\n<h2>Failed target experiments</h2>\n<table>\n<thead>\n<tr>\n<th>Target scheme</th>\n<th>Issues faced</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Weibull fitter</td>\n<td>* Very low single model CV and high standard deviation across folds</td>\n</tr>\n<tr>\n<td>Log-logistic</td>\n<td>* Very low single model CV for boosted trees and NN models</td>\n</tr>\n<tr>\n<td>Log-normal</td>\n<td>* Very low single model CV for boosted trees and NN models</td>\n</tr>\n</tbody>\n</table>\n<h2>CV-scheme</h2>\n<p>I used a variety of CV schemes to varying degrees of success, but decided to opt for 10-fold (simple K-fold)<br>\n<code>cv = KFold(random_state = 42, n_splits = 10, shuffle = True)</code></p>\n<h2>Failed CV experiments</h2>\n<table>\n<thead>\n<tr>\n<th>CV scheme</th>\n<th>Issues faced</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Stratified Kfold - <br> race group</td>\n<td>* Single models had a greater CV than kfold and CV-LB was good, but ensemble CV-LB went awry</td>\n</tr>\n<tr>\n<td>Stratified Kfold - <br> race group + year-hct</td>\n<td>* Single model CV-LB were not in sync after a point</td>\n</tr>\n<tr>\n<td>Stratified Kfold - <br> race group + year-hct + efs</td>\n<td>* Single model CV-LB were not in sync, especially for the Autogluon model</td>\n</tr>\n</tbody>\n</table>\n<h1><strong>Model pipeline</strong></h1>\n<p>Given below are the CV scores across component models -</p>\n<table>\n<thead>\n<tr>\n<th>Model Label</th>\n<th>CV score <br> no mask</th>\n<th>LB score <br> no mask</th>\n<th>CV score <br> mask</th>\n<th>LB score <br> mask</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>LITNN</td>\n<td>0.68269241</td>\n<td>0.688</td>\n<td>0.68351879</td>\n<td>0.689</td>\n</tr>\n<tr>\n<td>TABM</td>\n<td>0.68104054</td>\n<td>0.685</td>\n<td>0.68151639</td>\n<td>0.685</td>\n</tr>\n<tr>\n<td>L1-AG</td>\n<td>0.68051078</td>\n<td>0.687</td>\n<td>0.68136013</td>\n<td>0.688</td>\n</tr>\n<tr>\n<td>L1-ML</td>\n<td>0.6684 - 0.6792</td>\n<td>0.673 - 0.685</td>\n<td>0.6704 - 0.6810</td>\n<td>0.674 - 0.685</td>\n</tr>\n<tr>\n<td>L2-ML</td>\n<td>0.68422683</td>\n<td>0.689</td>\n<td>0.68554</td>\n<td>0.689</td>\n</tr>\n<tr>\n<td>L2-LAMA</td>\n<td>0.67890052</td>\n<td>0.688</td>\n<td>0.681053</td>\n<td>0.689</td>\n</tr>\n<tr>\n<td>XGBR Sample Weights</td>\n<td>0.68174912 <br> 0.68046331</td>\n<td>0.686 <br> 0.685</td>\n<td>0.68267643</td>\n<td>0.686 <br> 0.686</td>\n</tr>\n</tbody>\n</table>\n<h2>Key notes</h2>\n<ul>\n<li>Early stopping worked for me across boosted trees. Not using this reduced the CV score for me across models </li>\n<li>Training on CPU provided a better CV score than training on GPU, especially for Catboost</li>\n<li>I used target separators as the ones below-<br>\n<code>np.where( ytrain.efs == 1, ytrain[\"KMF\"] + separation_factor, ytrain[\"KMF\"])</code></li>\n<li>Using no separation (separation = 0) yielded a lower CV score for me. Separation constant of <code>0.10 and 0.15</code>were most productive for me</li>\n<li>The XGB classifier mask upgraded the CV across model components but failed to improve the leaderboard almost throughout</li>\n<li>Almost all feature engineering ideas were futile - using the base features as is helped a lot</li>\n<li>Using the starting features and OOF features from across boosted tree models in a separate boosted tree stacking L2 model helped a lot with the CV and a bit with the leaderboard as well</li>\n<li>Stacking a NN model with boosted tree OOF features helped with the LB but not the CV (gap between CV and LB increased from 0.006 to 0.009)</li>\n<li>Stacking a boosted tree model with TABM model OOF features also increased the gap between CV and LB and was precluded </li>\n</ul>\n<h1>Final ensemble and post-processing</h1>\n<ul>\n<li>I used the public XGBclassifier and masked the predictions as illustrated in the kernel (predicted efs == 1 cases and adjusted the predictions upward). Instead of using a single weight across all model choices, I resorted to tuning <strong>each model by a suitable separator according to the optimal CV scores</strong></li>\n<li>I used a ridge model as a base for the ensemble (though this idea did not work on the leaderboard with scores 0.686-0.687)</li>\n<li>I realized that using negative weights across models could be tested here - I tuned weights manually post the ridge and improved the CV score thereby with a suitable weight set</li>\n<li>My alternative submission was the same model structure without the masking structure </li>\n</ul>\n<table>\n<thead>\n<tr>\n<th>Submission details</th>\n<th>CV score</th>\n<th>Public leaderboard</th>\n<th>Private Leaderboard</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Model structure without masking but positive weights across single models</td>\n<td>0.685564</td>\n<td>0.690</td>\n<td>0.693</td>\n</tr>\n<tr>\n<td>Model structure without masking and any weight across the blend - <strong>final</strong></td>\n<td>0.686844</td>\n<td>0.691</td>\n<td>0.693</td>\n</tr>\n<tr>\n<td>Model structure with masking and any weight across the blend - <strong>final</strong></td>\n<td>0.6878442</td>\n<td>0.689</td>\n<td>0.692</td>\n</tr>\n<tr>\n<td>Model structure with masking for boosted trees only and any weight across the blend</td>\n<td>0.6878162</td>\n<td>0.689</td>\n<td>0.692</td>\n</tr>\n</tbody>\n</table>\n<h1>Excluded models from the final ensemble</h1>\n<table>\n<thead>\n<tr>\n<th>Model choice</th>\n<th>Exclusion reason</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>TABM RMSE loss function</td>\n<td>Good CV-LB with single model but never fitted well in the ensemble - using it almost always reduced the CV score</td>\n</tr>\n<tr>\n<td>TABM MAE loss function</td>\n<td>Moderate CV-LB with single model but never fitted well in the ensemble - using it almost always reduced the CV score</td>\n</tr>\n<tr>\n<td>MLP RMSE loss function</td>\n<td>Low CV score and excluded from single models</td>\n</tr>\n<tr>\n<td>Boosted trees with MAE metric and loss function optimization</td>\n<td>Low CV score and excluded from single models</td>\n</tr>\n</tbody>\n</table>\n<h1>Final thoughts and remarks</h1>\n<p>Wishing you the best for the future and happy learning! All the best for the upcoming Playground episodes and featured competitions as well!</p>\n<p>Best regards,<br>\nRavi Ramakrishnan</p>",
      "rawMarkdown": "Hello all,\n\nFirstly, I wish to extend sincere thanks to Kaggle and CIBMTR for a very accessible tabular competition. I also wish to thank the contributors in the public forums for such a generous contribution through Dec2024-Mar2025! In my 3 years of Kaggle competitions, I have witnessed very few competitions with such a great public sharing across the forums! Sincere thanks to all the contributors! Also, special thanks to @benjenkins96 and @meetbabariya for the team-up, we have a silver here!\n\nMy approach for the competition focused on a simple blend of boosted tree and NN models with and without the classifier masking public kernel. I used selective public work from across the forums, carefully modifying the ideas propitiated with private work and associated adjustments as below-\n\n# Model pipeline architecture \n\nMy model pipeline for the assignment can be summarized as below-\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8273630%2F59d069a2cccf5bf496d2d9fb02127c25%2FCIBMTR.png?generation=1741205788430128&alt=media)\n\n# Preprocessing\n\n## Feature engineering\n- Almost negligible, competition features were sufficient in entirety\n- Used `row-na = df.isna().sum(axis=1)` as an extra feature \n\n## Failed Feature Engineering experiments\n- Target encoder 😀\n- MEstimate encoder\n- Bigram and trigram interactions \n- Converting all features to string/ text type (this is commonly done in playground competitions)\n- HLA feature adjustment (taken from public work)\n- PCA (adapted from Yunbase)\n- Age in years and age in days (separating integer and decimal from age)\n\n## Target variable choices \n- Kaplan Meier Fitter (most stable and offered the best CV-LB)\n- Nelson Aelen Fitter (fitted well with the best CV but scored lower on the LB)\n- BFH Fitter (moderate CV and LB scores, but scores were always in sync)\n- Log efs-time (used in public NN models)\n\n## Failed target experiments\n| Target scheme | Issues faced   |\n| --- | --- |\n|  Weibull fitter| * Very low single model CV and high standard deviation across folds  |\n|  Log-logistic| * Very low single model CV for boosted trees and NN models   |\n| Log-normal | * Very low single model CV for boosted trees and NN models  |\n\n## CV-scheme\nI used a variety of CV schemes to varying degrees of success, but decided to opt for 10-fold (simple K-fold)\n`cv = KFold(random_state = 42, n_splits = 10, shuffle = True)`\n\n## Failed CV experiments \n\n| CV scheme | Issues faced   |\n| --- | --- |\n|  Stratified Kfold - <br> race group| * Single models had a greater CV than kfold and CV-LB was good, but ensemble CV-LB went awry |\n|  Stratified Kfold - <br> race group + year-hct| * Single model CV-LB were not in sync after a point  |\n|  Stratified Kfold - <br> race group + year-hct + efs| * Single model CV-LB were not in sync, especially for the Autogluon model  |\n\n# **Model pipeline**\n\nGiven below are the CV scores across component models -\n\n|Model Label|CV score <br> no mask|LB score <br> no mask| CV score <br> mask | LB score <br> mask|\n|---------- | ----- | -----|----- | ------|\n|LITNN |    0.68269241 | 0.688 |0.68351879 |0.689 | \n|TABM  |    0.68104054 | 0.685 |0.68151639 |0.685 | \n|L1-AG |    0.68051078 | 0.687 |0.68136013| 0.688| \n|L1-ML |    0.6684 - 0.6792 | 0.673 - 0.685      |0.6704 - 0.6810| 0.674 - 0.685| \n|L2-ML |    0.68422683 | 0.689 |0.68554| 0.689 | \n|L2-LAMA |  0.67890052 | 0.688 |0.681053| 0.689| \n|XGBR Sample Weights | 0.68174912 <br> 0.68046331  | 0.686 <br> 0.685|0.68267643| 0.686 <br> 0.686 | \n\n## Key notes\n- Early stopping worked for me across boosted trees. Not using this reduced the CV score for me across models \n- Training on CPU provided a better CV score than training on GPU, especially for Catboost\n- I used target separators as the ones below-\n`np.where( ytrain.efs == 1, ytrain[\"KMF\"] + separation_factor, ytrain[\"KMF\"])`\n- Using no separation (separation = 0) yielded a lower CV score for me. Separation constant of `0.10 and 0.15 `were most productive for me\n- The XGB classifier mask upgraded the CV across model components but failed to improve the leaderboard almost throughout\n- Almost all feature engineering ideas were futile - using the base features as is helped a lot\n- Using the starting features and OOF features from across boosted tree models in a separate boosted tree stacking L2 model helped a lot with the CV and a bit with the leaderboard as well\n- Stacking a NN model with boosted tree OOF features helped with the LB but not the CV (gap between CV and LB increased from 0.006 to 0.009)\n- Stacking a boosted tree model with TABM model OOF features also increased the gap between CV and LB and was precluded \n\n# Final ensemble and post-processing \n- I used the public XGBclassifier and masked the predictions as illustrated in the kernel (predicted efs == 1 cases and adjusted the predictions upward). Instead of using a single weight across all model choices, I resorted to tuning **each model by a suitable separator according to the optimal CV scores**\n- I used a ridge model as a base for the ensemble (though this idea did not work on the leaderboard with scores 0.686-0.687)\n- I realized that using negative weights across models could be tested here - I tuned weights manually post the ridge and improved the CV score thereby with a suitable weight set\n- My alternative submission was the same model structure without the masking structure \n\n| Submission details  | CV score | Public leaderboard| Private Leaderboard | \n| --- | --- | ---- | ----- | \n|  Model structure without masking but positive weights across single models | 0.685564  | 0.690| 0.693 | \n|  Model structure without masking and any weight across the blend - **final** | 0.686844  | 0.691 | 0.693 | \n|  Model structure with masking and any weight across the blend - **final**| 0.6878442  | 0.689| 0.692 | \n|  Model structure with masking for boosted trees only and any weight across the blend| 0.6878162  | 0.689| 0.692 |\n\n# Excluded models from the final ensemble\n\n| Model choice | Exclusion reason  |\n| --- | --- |\n| TABM RMSE loss function | Good CV-LB with single model but never fitted well in the ensemble - using it almost always reduced the CV score  |\n| TABM MAE loss function | Moderate CV-LB with single model but never fitted well in the ensemble - using it almost always reduced the CV score  |\n| MLP RMSE loss function |Low CV score and excluded from single models   |\n| Boosted trees with MAE metric and loss function optimization | Low CV score and excluded from single models   |\n\n# Final thoughts and remarks\nWishing you the best for the future and happy learning! All the best for the upcoming Playground episodes and featured competitions as well!\n\nBest regards,\nRavi Ramakrishnan",
      "votes": 31
    },
    {
      "id": 3217270,
      "postDate": "2025-06-04T18:45:14.193Z",
      "content": "<p>Congratulations!! can you share your notebook</p>",
      "rawMarkdown": "Congratulations!! can you share your notebook",
      "votes": 1,
      "replies": [
        {
          "id": 3217282,
          "postDate": "2025-06-04T19:19:38.030Z",
          "content": "<p>This is not one but a collection of more than 50 scripts <a href=\"https://www.kaggle.com/pacesetter55\" target=\"_blank\">@pacesetter55</a> </p>",
          "rawMarkdown": "This is not one but a collection of more than 50 scripts @pacesetter55 ",
          "votes": 1
        }
      ]
    },
    {
      "id": 3142653,
      "postDate": "2025-03-06T15:08:03.867Z",
      "content": "<p><a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a> Congrats for your team's solution and experiments; the latter are similar to my own private experiments to an extent. </p>\n<p>It's a pity (for me) that I missed the <code>BreslowFlemingHarringtonFitter</code> target, as GBDT models with this target are on-par with Kaplan-Meier and Nelson-Aalen; I could have a 0.001 boost for my ensemble and perhaps reaching 0.694 LB, but I am satisfied with a silver medal. </p>\n<p>Best of luck for the next competitions!</p>",
      "rawMarkdown": "@ravi20076 Congrats for your team's solution and experiments; the latter are similar to my own private experiments to an extent. \n\nIt's a pity (for me) that I missed the `BreslowFlemingHarringtonFitter` target, as GBDT models with this target are on-par with Kaplan-Meier and Nelson-Aalen; I could have a 0.001 boost for my ensemble and perhaps reaching 0.694 LB, but I am satisfied with a silver medal. \n\nBest of luck for the next competitions!",
      "votes": 1,
      "replies": [
        {
          "id": 3146196,
          "postDate": "2025-03-10T16:17:15.300Z",
          "content": "<p>Thanks man <a href=\"https://www.kaggle.com/andreasbis\" target=\"_blank\">@andreasbis</a> <br>\nSee you around my friend!</p>",
          "rawMarkdown": "Thanks man @andreasbis \nSee you around my friend!",
          "votes": 1
        }
      ]
    },
    {
      "id": 3142107,
      "postDate": "2025-03-06T05:13:34.193Z",
      "content": "<p>Congrats! It's been great working with you on this competition. Appreciate all your insights and effort. </p>",
      "rawMarkdown": "Congrats! It's been great working with you on this competition. Appreciate all your insights and effort. ",
      "votes": 1
    },
    {
      "id": 3141833,
      "postDate": "2025-03-06T00:17:20.067Z",
      "content": "<p><a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a> Congratulations! I knew you would escape the shakeup. Amazing solution!</p>",
      "rawMarkdown": "@ravi20076 Congratulations! I knew you would escape the shakeup. Amazing solution!",
      "votes": 1,
      "replies": [
        {
          "id": 3141864,
          "postDate": "2025-03-06T00:45:19.130Z",
          "content": "<p>Same for you - I think we thought alike, from our approaches (based on public work of course) and ended up at the same place <a href=\"https://www.kaggle.com/abdmental01\" target=\"_blank\">@abdmental01</a>!</p>",
          "rawMarkdown": "Same for you - I think we thought alike, from our approaches (based on public work of course) and ended up at the same place @abdmental01!",
          "votes": 1
        }
      ]
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T19:44:46Z",
  "competition_id": 70942,
  "competition_slug": "equity-post-HCT-survival-predictions",
  "team_id": 13067504,
  "solution_url": "/competitions/equity-post-HCT-survival-predictions/writeups/ben-ravi-meet-rank-120-approach-simplicity-is-the-"
}