{
  "id": 442273,
  "title": "43rd (top 3%) silver medal solution",
  "content": "<p>The following presents my solution, which got 43rd place on the private leaderboard and earned me a silver medal.</p>\n<p>You can see the code for my solution <a href=\"https://www.kaggle.com/code/wisawesome/amp-pdpp-top-3-solution-code/notebook\" target=\"_blank\">here</a>.</p>\n<h1>General remarks and sketch of my solution method</h1>\n<ul>\n<li><p>I constructed my solution using protein data and <code>visit_month</code> only. I did not use the peptide data at all. I felt that all of the necessary information in the peptide data was summarized in the protein data as every peptide has a 1:1 relationship with a protein. Moreover, because a protein has many peptides, using the peptide data could lead to a situation where a particular protein was detected for 2 different observations using different peptides; thus, using peptide data could have led to a situation where the same information (the detection of a protein) could be obfuscated by seemingly different features (different peptides).</p></li>\n<li><p>This competition was very difficult because of the very large number of targets which competitors are forced to predict. In particular for all 4 updrs scores, we were asked to predict that score 0, 6, 12, and 24 months ahead. Moreover, we must make these predictions from every possible <code>visit_month</code>. In other words, if, for instance, <code>visit_month == 36</code>, then we must predict all 4 updrs for the 36th month, the 42nd month, the 48th month and the 60th month. To make things even worse, no conclusive list of possible <code>visit_month</code>s was ever provided throughout the competition. I strongly believe that this extraordinary complexity made this competition extremely challenging and interesting.</p></li>\n<li><p>To tackle the complexity, for every combination of updrs (except for <code>updrs_4</code>), <code>visit_month</code>, and months ahead, I trained a separate CatBoost model. For each of these models, I optimized the hyperparameters using Optuna.</p></li>\n<li><p>For <code>updrs_4</code> I used a linear model provided by <a href=\"https://www.kaggle.com/code/ambrosm/pdpp-almost-only-trends\" target=\"_blank\">https://www.kaggle.com/code/ambrosm/pdpp-almost-only-trends</a> by <a href=\"https://www.kaggle.com/ambrosm\" target=\"_blank\">Ambrosm</a> which itself was a variation of code originally posted by <a href=\"https://www.kaggle.com/code/vitalykudelya/only-trends\" target=\"_blank\">https://www.kaggle.com/code/vitalykudelya/only-trends</a> by <a href=\"https://www.kaggle.com/vitalykudelya\" target=\"_blank\">Vitaly Kudelya</a>. I used a clip month of 54 for <code>updrs_4</code>.</p></li>\n<li><p>Moreover, because of the large number of targets, it was possible for some observations in the test set and for some targets the prediction ought to be outside the range of what was seen in training. Because tree-based models extrapolate very poorly, I felt that if the prediction updrs score provided by CatBoost was at the boundary of what was seen in training, then that prediction might be very poor. As such, in cases where CatBoost predicted a score at the boundary of the training data, that score was disregarded and the linear model described in the previous bullet point was used instead.</p></li>\n</ul>\n<h1>What worked for me</h1>\n<ul>\n<li><p>A combination of CatBoost and the linear model in instances where CatBoost predicts the boundary appeared to work best in GroupKFold cross-validation. Due to the large number of targets CatBoost did a worse job by itself without the linear component.</p></li>\n<li><p>Setting the objective to MAE for CatBoost appeared to provide better results than MSE.</p></li>\n</ul>\n<h1>What did not work for me</h1>\n<ul>\n<li>XGBoost</li>\n<li>LightGBM</li>\n<li>Random forest</li>\n<li>SVR</li>\n<li>Plain vanilla CatBoost without the linear model for <code>updrs_4</code> and for CatBoost predictions outside the bounds of what was seen in training</li>\n<li>Models based on <code>visit_month</code> alone. I missed the trick all top notebooks used, but absent the trick, I found that including the protein data gave superior results.</li>\n</ul>\n<h1>Concluding remarks</h1>\n<p>I really enjoyed this competition and I hope the organizers will find our solutions useful.<br>\nCongrats to all winners and good luck to all in future competitions!!!</p>",
  "comments": [],
  "comment_count": 0,
  "messages": [
    {
      "id": 2450469,
      "postDate": "2023-09-21T22:34:10.547Z",
      "content": "<p>The following presents my solution, which got 43rd place on the private leaderboard and earned me a silver medal.</p>\n<p>You can see the code for my solution <a href=\"https://www.kaggle.com/code/wisawesome/amp-pdpp-top-3-solution-code/notebook\" target=\"_blank\">here</a>.</p>\n<h1>General remarks and sketch of my solution method</h1>\n<ul>\n<li><p>I constructed my solution using protein data and <code>visit_month</code> only. I did not use the peptide data at all. I felt that all of the necessary information in the peptide data was summarized in the protein data as every peptide has a 1:1 relationship with a protein. Moreover, because a protein has many peptides, using the peptide data could lead to a situation where a particular protein was detected for 2 different observations using different peptides; thus, using peptide data could have led to a situation where the same information (the detection of a protein) could be obfuscated by seemingly different features (different peptides).</p></li>\n<li><p>This competition was very difficult because of the very large number of targets which competitors are forced to predict. In particular for all 4 updrs scores, we were asked to predict that score 0, 6, 12, and 24 months ahead. Moreover, we must make these predictions from every possible <code>visit_month</code>. In other words, if, for instance, <code>visit_month == 36</code>, then we must predict all 4 updrs for the 36th month, the 42nd month, the 48th month and the 60th month. To make things even worse, no conclusive list of possible <code>visit_month</code>s was ever provided throughout the competition. I strongly believe that this extraordinary complexity made this competition extremely challenging and interesting.</p></li>\n<li><p>To tackle the complexity, for every combination of updrs (except for <code>updrs_4</code>), <code>visit_month</code>, and months ahead, I trained a separate CatBoost model. For each of these models, I optimized the hyperparameters using Optuna.</p></li>\n<li><p>For <code>updrs_4</code> I used a linear model provided by <a href=\"https://www.kaggle.com/code/ambrosm/pdpp-almost-only-trends\" target=\"_blank\">https://www.kaggle.com/code/ambrosm/pdpp-almost-only-trends</a> by <a href=\"https://www.kaggle.com/ambrosm\" target=\"_blank\">Ambrosm</a> which itself was a variation of code originally posted by <a href=\"https://www.kaggle.com/code/vitalykudelya/only-trends\" target=\"_blank\">https://www.kaggle.com/code/vitalykudelya/only-trends</a> by <a href=\"https://www.kaggle.com/vitalykudelya\" target=\"_blank\">Vitaly Kudelya</a>. I used a clip month of 54 for <code>updrs_4</code>.</p></li>\n<li><p>Moreover, because of the large number of targets, it was possible for some observations in the test set and for some targets the prediction ought to be outside the range of what was seen in training. Because tree-based models extrapolate very poorly, I felt that if the prediction updrs score provided by CatBoost was at the boundary of what was seen in training, then that prediction might be very poor. As such, in cases where CatBoost predicted a score at the boundary of the training data, that score was disregarded and the linear model described in the previous bullet point was used instead.</p></li>\n</ul>\n<h1>What worked for me</h1>\n<ul>\n<li><p>A combination of CatBoost and the linear model in instances where CatBoost predicts the boundary appeared to work best in GroupKFold cross-validation. Due to the large number of targets CatBoost did a worse job by itself without the linear component.</p></li>\n<li><p>Setting the objective to MAE for CatBoost appeared to provide better results than MSE.</p></li>\n</ul>\n<h1>What did not work for me</h1>\n<ul>\n<li>XGBoost</li>\n<li>LightGBM</li>\n<li>Random forest</li>\n<li>SVR</li>\n<li>Plain vanilla CatBoost without the linear model for <code>updrs_4</code> and for CatBoost predictions outside the bounds of what was seen in training</li>\n<li>Models based on <code>visit_month</code> alone. I missed the trick all top notebooks used, but absent the trick, I found that including the protein data gave superior results.</li>\n</ul>\n<h1>Concluding remarks</h1>\n<p>I really enjoyed this competition and I hope the organizers will find our solutions useful.<br>\nCongrats to all winners and good luck to all in future competitions!!!</p>",
      "rawMarkdown": "The following presents my solution, which got 43rd place on the private leaderboard and earned me a silver medal.\n\nYou can see the code for my solution [here](https://www.kaggle.com/code/wisawesome/amp-pdpp-top-3-solution-code/notebook).\n\n# General remarks and sketch of my solution method\n\n- I constructed my solution using protein data and `visit_month` only. I did not use the peptide data at all. I felt that all of the necessary information in the peptide data was summarized in the protein data as every peptide has a 1:1 relationship with a protein. Moreover, because a protein has many peptides, using the peptide data could lead to a situation where a particular protein was detected for 2 different observations using different peptides; thus, using peptide data could have led to a situation where the same information (the detection of a protein) could be obfuscated by seemingly different features (different peptides).\n\n- This competition was very difficult because of the very large number of targets which competitors are forced to predict. In particular for all 4 updrs scores, we were asked to predict that score 0, 6, 12, and 24 months ahead. Moreover, we must make these predictions from every possible `visit_month`. In other words, if, for instance, `visit_month == 36`, then we must predict all 4 updrs for the 36th month, the 42nd month, the 48th month and the 60th month. To make things even worse, no conclusive list of possible `visit_month`s was ever provided throughout the competition. I strongly believe that this extraordinary complexity made this competition extremely challenging and interesting.\n\n- To tackle the complexity, for every combination of updrs (except for `updrs_4`), `visit_month`, and months ahead, I trained a separate CatBoost model. For each of these models, I optimized the hyperparameters using Optuna.\n\n- For `updrs_4` I used a linear model provided by https://www.kaggle.com/code/ambrosm/pdpp-almost-only-trends by [Ambrosm](https://www.kaggle.com/ambrosm) which itself was a variation of code originally posted by https://www.kaggle.com/code/vitalykudelya/only-trends by [Vitaly Kudelya](https://www.kaggle.com/vitalykudelya). I used a clip month of 54 for `updrs_4`.\n\n- Moreover, because of the large number of targets, it was possible for some observations in the test set and for some targets the prediction ought to be outside the range of what was seen in training. Because tree-based models extrapolate very poorly, I felt that if the prediction updrs score provided by CatBoost was at the boundary of what was seen in training, then that prediction might be very poor. As such, in cases where CatBoost predicted a score at the boundary of the training data, that score was disregarded and the linear model described in the previous bullet point was used instead.\n\n# What worked for me\n\n- A combination of CatBoost and the linear model in instances where CatBoost predicts the boundary appeared to work best in GroupKFold cross-validation. Due to the large number of targets CatBoost did a worse job by itself without the linear component.\n\n- Setting the objective to MAE for CatBoost appeared to provide better results than MSE.\n\n# What did not work for me\n\n- XGBoost\n- LightGBM\n- Random forest\n- SVR\n- Plain vanilla CatBoost without the linear model for `updrs_4` and for CatBoost predictions outside the bounds of what was seen in training\n- Models based on `visit_month` alone. I missed the trick all top notebooks used, but absent the trick, I found that including the protein data gave superior results.\n\n# Concluding remarks\n\nI really enjoyed this competition and I hope the organizers will find our solutions useful.\nCongrats to all winners and good luck to all in future competitions!!!"
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T14:13:31Z",
  "competition_id": 37794,
  "competition_slug": "amp-parkinsons-disease-progression-prediction",
  "team_id": 10257704,
  "solution_url": "/competitions/amp-parkinsons-disease-progression-prediction/writeups/wojciech-victor-fulmyk-43rd-top-3-silver-medal-sol"
}