{
  "id": 567643,
  "title": "16 th Solution",
  "content": "<p><strong>1.Acknowledgement</strong><br>\nFirst and foremost，I'd like to start with a big respect to the following open source authors and my team:<br>\n1.one of our model from:<a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/albansteff/refactoring-nn-pairwise-ranking-loss</a><br>\n2.some feats from:<a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/yunsuxiaozi/cibmtr-yunbase</a><br>\n3.use the classifier to make post-processing：<a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/kendontcare11/public-classifier-cat-xgb-lb-0-688</a><br>\n4.The target constructor provided by <strong>all the great open source workers</strong>.<br>\n5.And the three brothers(<strong>leaf,yueming,DeepMayNotLearn</strong>),who have been preparing the postgraduate entrance exams ,thank them for their hard work<br>\n (the above ranking is in no particular order)</p>\n<p><strong>2.Plan introduction</strong><br>\n<strong>2.1 NN</strong><br>\n<strong>2.1.1 Multi-target NN&nbsp;</strong><br>\nA：target one： CV of CoxPHFitter<br>\nB：target two：custom_target to split the 0 1 as much as possible</p>\n<p><code>def custom_target(self): \n        cus_target =  self.data[['efs','efs_time']]\n        cus_target['y'] = self.data.efs_time.values\n        mx = cus_target.loc[cus_target.efs==1,\"efs_time\"].max()\n        mn = cus_target.loc[cus_target.efs==0,\"efs_time\"].min()\n        cus_target.loc[cus_target.efs==0,\"y\"] = cus_target.loc[cus_target.efs==0,\"y\"] + mx - mn\n        cus_target.y = cus_target.y.rank()\n        cus_target.loc[cus_target.efs==0,\"y\"] += 2*len(cus_target)\n        cus_target.y = cus_target.y / cus_target.y.max()\n        cus_target.y = np.log( cus_target.y )\n        cus_target.y -= cus_target.y.mean()\n        cus_target.y *= -1.0    \n        return cus_target\n</code></p>\n<p>We trained two simple models （CNN，DNN） to fit the two targets</p>\n<p><strong>2.1.2 Opensource ODST&nbsp;</strong><br>\nwe make some changes：&nbsp; &nbsp;<br>\n1.fill the unseen category with train[col].mode()[0] ,rather than np.nan<br>\n<code>if ind.any():\n    val.loc[ind, col] = train[col].mode()[0]</code><br>\n2.use weights（race_index of each fold) to ensemble each fold</p>\n<p><strong>2.1.3 Our ODST（pure torch version without torch lightning）</strong>&nbsp; <br>\n1.some additional feats from yunsuxiaozi‘s notebook&nbsp; &nbsp;<br>\n2.slights change the Hyperparameters&nbsp; &nbsp;<br>\n3.use weights to ensemble each fold best of our metric&nbsp; &nbsp;<br>\n4.use&nbsp;<strong>seed_torch(42+fold)</strong> to train the model of each fold</p>\n<p><strong>2.2 GBDT Tree</strong><br>\n  For the tree model part, we use two classification trees with different features to make post-processing.And use&nbsp; xgboost，lightgbm and catboost to train the common target mentioned in the public code.The features our tree used are easy to see in the public.</p>\n<p><strong>3.Overview of the Plan</strong><br>\nFor more details：<a href=\"https://www.kaggle.com/code/kudosn/nn-tree-ensemble&nbsp;\" target=\"_blank\">https://www.kaggle.com/code/kudosn/nn-tree-ensemble&nbsp;</a><br>\n![<a href=\"https://www.helloimg.com/i/2025/03/12/67d05e23c134a.png\" target=\"_blank\">https://www.helloimg.com/i/2025/03/12/67d05e23c134a.png</a>] (url to Plan Structure)<br>\n<strong>Tips：If want to run this notebook please change \"from cib_metric import score\" with \"from metric import score\",we just find the UTILITY SCRIPTS has been deleted.</strong><br>\n<strong>4.Eventually, Allow me to show great respect to the open source workers once again</strong><br>\n![<a href=\"https://www.helloimg.com/i/2025/03/12/67d05e22c6492.png\" target=\"_blank\">https://www.helloimg.com/i/2025/03/12/67d05e22c6492.png</a>] (url to a surprise)</p>",
  "comments": [
    {
      "id": 3147017,
      "author_name": "Donghui Zhang",
      "author_url": "",
      "post_date": "2025-03-11T15:00:45.257000",
      "content": "<p>Congratulations on winning the gold medal, good luck on your postgraduate entrance exam!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 3147090,
          "author_name": "Luck is all you need",
          "author_url": "",
          "post_date": "2025-03-11T16:24:41.347000",
          "content": "<p>Thanks bro ！！！</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "comment_count": 2,
  "messages": [
    {
      "id": 3146796,
      "postDate": "2025-03-11T08:56:37.473Z",
      "content": "<p><strong>1.Acknowledgement</strong><br>\nFirst and foremost，I'd like to start with a big respect to the following open source authors and my team:<br>\n1.one of our model from:<a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/albansteff/refactoring-nn-pairwise-ranking-loss</a><br>\n2.some feats from:<a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/yunsuxiaozi/cibmtr-yunbase</a><br>\n3.use the classifier to make post-processing：<a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/kendontcare11/public-classifier-cat-xgb-lb-0-688</a><br>\n4.The target constructor provided by <strong>all the great open source workers</strong>.<br>\n5.And the three brothers(<strong>leaf,yueming,DeepMayNotLearn</strong>),who have been preparing the postgraduate entrance exams ,thank them for their hard work<br>\n (the above ranking is in no particular order)</p>\n<p><strong>2.Plan introduction</strong><br>\n<strong>2.1 NN</strong><br>\n<strong>2.1.1 Multi-target NN&nbsp;</strong><br>\nA：target one： CV of CoxPHFitter<br>\nB：target two：custom_target to split the 0 1 as much as possible</p>\n<p><code>def custom_target(self): \n        cus_target =  self.data[['efs','efs_time']]\n        cus_target['y'] = self.data.efs_time.values\n        mx = cus_target.loc[cus_target.efs==1,\"efs_time\"].max()\n        mn = cus_target.loc[cus_target.efs==0,\"efs_time\"].min()\n        cus_target.loc[cus_target.efs==0,\"y\"] = cus_target.loc[cus_target.efs==0,\"y\"] + mx - mn\n        cus_target.y = cus_target.y.rank()\n        cus_target.loc[cus_target.efs==0,\"y\"] += 2*len(cus_target)\n        cus_target.y = cus_target.y / cus_target.y.max()\n        cus_target.y = np.log( cus_target.y )\n        cus_target.y -= cus_target.y.mean()\n        cus_target.y *= -1.0    \n        return cus_target\n</code></p>\n<p>We trained two simple models （CNN，DNN） to fit the two targets</p>\n<p><strong>2.1.2 Opensource ODST&nbsp;</strong><br>\nwe make some changes：&nbsp; &nbsp;<br>\n1.fill the unseen category with train[col].mode()[0] ,rather than np.nan<br>\n<code>if ind.any():\n    val.loc[ind, col] = train[col].mode()[0]</code><br>\n2.use weights（race_index of each fold) to ensemble each fold</p>\n<p><strong>2.1.3 Our ODST（pure torch version without torch lightning）</strong>&nbsp; <br>\n1.some additional feats from yunsuxiaozi‘s notebook&nbsp; &nbsp;<br>\n2.slights change the Hyperparameters&nbsp; &nbsp;<br>\n3.use weights to ensemble each fold best of our metric&nbsp; &nbsp;<br>\n4.use&nbsp;<strong>seed_torch(42+fold)</strong> to train the model of each fold</p>\n<p><strong>2.2 GBDT Tree</strong><br>\n  For the tree model part, we use two classification trees with different features to make post-processing.And use&nbsp; xgboost，lightgbm and catboost to train the common target mentioned in the public code.The features our tree used are easy to see in the public.</p>\n<p><strong>3.Overview of the Plan</strong><br>\nFor more details：<a href=\"https://www.kaggle.com/code/kudosn/nn-tree-ensemble&nbsp;\" target=\"_blank\">https://www.kaggle.com/code/kudosn/nn-tree-ensemble&nbsp;</a><br>\n![<a href=\"https://www.helloimg.com/i/2025/03/12/67d05e23c134a.png\" target=\"_blank\">https://www.helloimg.com/i/2025/03/12/67d05e23c134a.png</a>] (url to Plan Structure)<br>\n<strong>Tips：If want to run this notebook please change \"from cib_metric import score\" with \"from metric import score\",we just find the UTILITY SCRIPTS has been deleted.</strong><br>\n<strong>4.Eventually, Allow me to show great respect to the open source workers once again</strong><br>\n![<a href=\"https://www.helloimg.com/i/2025/03/12/67d05e22c6492.png\" target=\"_blank\">https://www.helloimg.com/i/2025/03/12/67d05e22c6492.png</a>] (url to a surprise)</p>",
      "rawMarkdown": "**1.Acknowledgement**\nFirst and foremost，I'd like to start with a big respect to the following open source authors and my team:\n1.one of our model from:[https://www.kaggle.com/code/albansteff/refactoring-nn-pairwise-ranking-loss](url)\n2.some feats from:[https://www.kaggle.com/code/yunsuxiaozi/cibmtr-yunbase](url)\n3.use the classifier to make post-processing：[https://www.kaggle.com/code/kendontcare11/public-classifier-cat-xgb-lb-0-688](url)\n4.The target constructor provided by **all the great open source workers**.\n5.And the three brothers(**leaf,yueming,DeepMayNotLearn**),who have been preparing the postgraduate entrance exams ,thank them for their hard work\n (the above ranking is in no particular order)\n\n**2.Plan introduction**\n**2.1 NN**\n**2.1.1 Multi-target NN **\nA：target one： CV of CoxPHFitter\nB：target two：custom_target to split the 0 1 as much as possible\n\n`def custom_target(self): \n        cus_target =  self.data[['efs','efs_time']]\n        cus_target['y'] = self.data.efs_time.values\n        mx = cus_target.loc[cus_target.efs==1,\"efs_time\"].max()\n        mn = cus_target.loc[cus_target.efs==0,\"efs_time\"].min()\n        cus_target.loc[cus_target.efs==0,\"y\"] = cus_target.loc[cus_target.efs==0,\"y\"] + mx - mn\n        cus_target.y = cus_target.y.rank()\n        cus_target.loc[cus_target.efs==0,\"y\"] += 2*len(cus_target)\n        cus_target.y = cus_target.y / cus_target.y.max()\n        cus_target.y = np.log( cus_target.y )\n        cus_target.y -= cus_target.y.mean()\n        cus_target.y *= -1.0    \n        return cus_target\n`\n\nWe trained two simple models （CNN，DNN） to fit the two targets\n\n**2.1.2 Opensource ODST **\nwe make some changes：   \n1.fill the unseen category with train[col].mode()[0] ,rather than np.nan\n`if ind.any():\n    val.loc[ind, col] = train[col].mode()[0]`\n2.use weights（race_index of each fold) to ensemble each fold\n\n**2.1.3 Our ODST（pure torch version without torch lightning）**  \n1.some additional feats from yunsuxiaozi‘s notebook   \n2.slights change the Hyperparameters   \n3.use weights to ensemble each fold best of our metric   \n4.use **seed_torch(42+fold)** to train the model of each fold\n\n**2.2 GBDT Tree**\n  For the tree model part, we use two classification trees with different features to make post-processing.And use  xgboost，lightgbm and catboost to train the common target mentioned in the public code.The features our tree used are easy to see in the public.\n\n**3.Overview of the Plan**\nFor more details：https://www.kaggle.com/code/kudosn/nn-tree-ensemble \n![https://www.helloimg.com/i/2025/03/12/67d05e23c134a.png] (url to Plan Structure)\n**Tips：If want to run this notebook please change \"from cib_metric import score\" with \"from metric import score\",we just find the UTILITY SCRIPTS has been deleted.**\n**4.Eventually, Allow me to show great respect to the open source workers once again**\n![https://www.helloimg.com/i/2025/03/12/67d05e22c6492.png] (url to a surprise)",
      "votes": 8
    },
    {
      "id": 3147017,
      "postDate": "2025-03-11T15:00:45.257Z",
      "content": "<p>Congratulations on winning the gold medal, good luck on your postgraduate entrance exam!</p>",
      "rawMarkdown": "Congratulations on winning the gold medal, good luck on your postgraduate entrance exam!",
      "replies": [
        {
          "id": 3147090,
          "postDate": "2025-03-11T16:24:41.347Z",
          "content": "<p>Thanks bro ！！！</p>",
          "rawMarkdown": "Thanks bro ！！！"
        }
      ]
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T19:50:26Z",
  "competition_id": 70942,
  "competition_slug": "equity-post-HCT-survival-predictions",
  "team_id": 13089230,
  "solution_url": "/competitions/equity-post-HCT-survival-predictions/writeups/last-dance-to-our-university-16-th-solution"
}