{
  "id": 417124,
  "title": "Silver Medal Approach -  AIRA MATRIX",
  "content": "<h1>AMP® Parkinson's Disease Progression Prediction</h1>\n<h2>Silver Medal Approach (Rank 57 Top 3%)</h2>\n<p>Authors:  <a href=\"https://www.kaggle.com/omkarnanekarairam\" target=\"_blank\">Omkar Nanekar</a> and <a href=\"https://www.kaggle.com/adityavartak\" target=\"_blank\">Aditya Vartak</a></p>\n<h1>Deconstructing the problem statement</h1>\n<h2>Motivation</h2>\n<p>Parkinson's disease (PD) is a degenerative brain disorder that significantly impairs movement, cognition, sleep, and various other normal functions. Unfortunately, there is currently no known cure for PD, and the condition progressively worsens over time. It is projected that by 2037, approximately 1.6 million people in the United States will be affected by Parkinson's disease, resulting in an economic burden nearing $80 billion. <br>\nExtensive research suggests that abnormalities in proteins or peptides play a crucial role in the onset and progression of this disease. By leveraging the power of data science, gaining a deeper understanding of these abnormalities could provide vital insights for the development of new pharmacotherapies aimed at slowing down disease progression or finding a cure for Parkinson's. Significant efforts have been made to collect complex clinical and neurobiological data from over 10,000 subjects, with the intention of sharing this valuable information with the research community. While important discoveries have emerged from this data, the identification of definitive biomarkers or curative approaches remains elusive. Therefore, investigating potential causes of Parkinson's disease is essential in the ongoing quest for a cure, as it would greatly alleviate the immense suffering endured by patients and help reduce the substantial medical care costs associated with this condition.</p>\n<h2>Problem Statement</h2>\n<p>The objective of this competition is to create a predictive model for MDS-UPDRS scores, which are used to measure the progression of Parkinson's disease in patients. The MDS-UPDRS is a comprehensive evaluation tool that assesses both motor and non-motor symptoms associated with Parkinson's. In this competition, you will develop a model that utilizes data on protein and peptide levels collected over time from subjects with Parkinson's disease and age-matched control subjects without the disease. The outcome of your work has the potential to offer valuable insights into the specific molecules that undergo changes as Parkinson's disease advances, thereby contributing to important breakthroughs in our understanding of the disease.</p>\n<table>\n<thead>\n<tr>\n<th>MDS-UPDRS-Level</th>\n<th>Cognitive impairment</th>\n<th>Hallucinations</th>\n<th>Depressed mood</th>\n<th>Anxious</th>\n<th>Apathy</th>\n<th>Dopamine Dysregulation</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Level 1</td>\n<td>Slight</td>\n<td>Rare</td>\n<td>Short spurts</td>\n<td>Short spurts</td>\n<td>Slight</td>\n<td>Rare</td>\n</tr>\n<tr>\n<td>Level 2</td>\n<td>Minimal</td>\n<td>Frequent</td>\n<td>Multiple Days</td>\n<td>Multiple Days</td>\n<td>Some activities</td>\n<td>Minor</td>\n</tr>\n<tr>\n<td>Level 3</td>\n<td>Interfering with daily activities</td>\n<td>loss of Insight</td>\n<td>Interfering with daily activities</td>\n<td>Interfering with daily activities</td>\n<td>Most activities</td>\n<td>Major</td>\n</tr>\n<tr>\n<td>Level 4</td>\n<td>Severe</td>\n<td>Delusion</td>\n<td>Severe</td>\n<td>Severe</td>\n<td>No initiative</td>\n<td>Severe</td>\n</tr>\n</tbody>\n</table>\n<pre><code>                        1:  -UPDRS  and its characteristics\n</code></pre>\n<h2>Competition Evaluation</h2>\n<p>It is a Notebooks-only submission competition. i.e submissions have to be in the form of a runnable kaggle notebook.Submissions to this competition required using the provided python time-series API, which ensures that models do not peek forward in time.</p>\n<p>The metric used is SMAPE (Symmetric mean absolute percentage error). The formula for the same is as follows:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2Fe96fb55fc713956263611ce3bdef1a6d%2FSMAPE.png?generation=1686726363879996&amp;alt=media\" alt=\"\"><br>\nDuring the competition, the metric was changed to SMAPE+1 because if actual value is zero and predicted value is &gt;1 , then SMAPE goes to 200% , which leads to unstable evaluations.  Hence  the competition hosts changed the metric to SMAPE + 1 to mitigate the impact of cases where the true UPDRS score is zero. The metric is the same as SMAPE except that we add 1 to both actual value and predicted value before calculating SMAPE.</p>\n<h2>Data</h2>\n<p>The dataset comprises protein abundance data obtained from mass spectrometry readings of cerebrospinal fluid (CSF) samples collected from Parkinson's disease (PD) patients. It includes information at both the peptide and protein level, with associated visit and patient identifiers. Clinical data such as UPDRS scores, representing PD severity, are also provided. The dataset allows for time-series analysis as patients contributed samples over multiple visits. The goal of the competition is to leverage this data to predict the progression of PD using protein abundance information. Whereas the test data set was kept hidden, so it wasn't possible to determine the counts of patients or the samples in test data. However the public leaderboard scores were based on 13% of data and remaining 87% data were used for the private and final leaderboard.</p>\n<table>\n<thead>\n<tr>\n<th>visit_id</th>\n<th>patient_id</th>\n<th>visit_month</th>\n<th>updrs_1</th>\n<th>updrs_2</th>\n<th>updrs_3</th>\n<th>updrs_4</th>\n<th>upd23b_clinical_state_on_medication</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>55_0</td>\n<td>55</td>\n<td>0</td>\n<td>10</td>\n<td>6</td>\n<td>15</td>\n<td>NaN</td>\n<td>NaN</td>\n</tr>\n<tr>\n<td>55_3</td>\n<td>55</td>\n<td>3</td>\n<td>10</td>\n<td>7</td>\n<td>25</td>\n<td>NaN</td>\n<td>NaN</td>\n</tr>\n<tr>\n<td>55_6</td>\n<td>55</td>\n<td>6</td>\n<td>8</td>\n<td>10</td>\n<td>34</td>\n<td>NaN</td>\n<td>NaN</td>\n</tr>\n<tr>\n<td>55_9</td>\n<td>55</td>\n<td>9</td>\n<td>8</td>\n<td>9</td>\n<td>30</td>\n<td>0</td>\n<td>On</td>\n</tr>\n<tr>\n<td>55_12</td>\n<td>55</td>\n<td>12</td>\n<td>10</td>\n<td>10</td>\n<td>41</td>\n<td>0</td>\n<td>On</td>\n</tr>\n</tbody>\n</table>\n<pre><code>                                   .    \n</code></pre>\n<table>\n<thead>\n<tr>\n<th>visit_id</th>\n<th>visit_month</th>\n<th>patient_id</th>\n<th>UniProt</th>\n<th>NPX</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00391</td>\n<td>11254.3</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>732430</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00584</td>\n<td>39585.8</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O14498</td>\n<td>41526.9</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O14773</td>\n<td>31238</td>\n</tr>\n</tbody>\n</table>\n<pre><code>                                   .    \n</code></pre>\n<table>\n<thead>\n<tr>\n<th>visit_id</th>\n<th>visit_month</th>\n<th>patient_id</th>\n<th>UniProt</th>\n<th>Peptide</th>\n<th>PeptideAbundance</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00391</td>\n<td>NEQEQPLGQWHLS</td>\n<td>11254.3</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>GNPEPTFSWTK</td>\n<td>102060</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>IEIPSSVQQVPTIIK</td>\n<td>174185</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>KPQSAVYSTGSNGILLC(UniMod_4)EAEGEPQPTIK</td>\n<td>27278.9</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>SMEQNGPGLEYR</td>\n<td>30838.7</td>\n</tr>\n</tbody>\n</table>\n<pre><code>                                   .    \n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F87283515bf56fa4b8903d9b42a84e1a2%2FAMP%20PPDP%20Appraoch(1).drawio.png?generation=1686735659764230&amp;alt=media\"></p>\n<pre><code>                                    . Our Approach\n</code></pre>\n<h1>Overview of Final Approach</h1>\n<h2>Training</h2>\n<p>Fig. 1 Depicts the flow we followed in our best approach for the competition. To improve our performance in the competition, we adopted the following strategy:</p>\n<ol>\n<li>Exploratory Experiments: We conducted a series of initial experiments using various pre-trained approaches. This allowed us to quickly identify the most effective architectures for our task.</li>\n<li>Advanced Techniques: Once we identified the promising architectures, we applied advanced techniques such as fine-tuning, changing the cross validation steps, proteins and peptide information. This iterative process helped us optimize the models further.</li>\n<li>Change in target: As the problem was to predict the 4 UPDRS scores(i.e updrs_1,updrs_2,updrs_3 and updrs_4) based on the time series of patients. To do this we adapted the architecture where we focus on finding the trend of the target among the time period. In summary, we calculated trends for different targets based on a dataset by finding the optimal trend values that minimize the difference between the true values and the predictions. The results are stored in a dictionary for each target to use later for predictions on test data.</li>\n<li>Protein Information Extraction: From the Pearson correlation among all 4 updrs scores and provided 229 proteins. Then took the average among all 4 updrs scores and picked up the top one to proceed further. We then used this protein with the trend found for the updrs score to find out the shift in protein with time. To do this we calculated the optimal protein shift for different quantile ranges and targets. We did this by filtering the dataset based on the quantile ranges like  {'quantile_low': 0.0, 'quantile_high': 0.03}, {'quantile_low': 0.06, 'quantile_high': 0.98}, {'quantile_low': 0.94, 'quantile_high': 1.0}, for finding the best protein shift using an optimization algorithm, and storing the results in a dictionary.</li>\n<li>Model Ensemble: After finding the best shifts for protein and trend value for updrs scores we used this information for prediction for test score. For prediction of the score, we rounded the scores to the nearest whole number. </li>\n</ol>\n<p>In summary, we used the provided API to iterate over the test data and combine protein features with other relevant information. Then fill the NA values by the forward fill method. Then, calculated ratings for different targets based on prediction months and trend values. The ratings then are adjusted based on protein values within specific quantile ranges. By employing this approach, we achieved a significant boost in our predictions and obtained the final prediction for the competition.</p>\n<h2>Cross-Validation</h2>\n<p>As test data doesn’t contain any patient data from the training set, to perform the cross-validation we cannot use time-series based approaches, instead we used the cross validation with GroupKFold level on patient_id. We did the above in order to avoid the patients in our train data to be a part of our test data, thus avoiding data leakage</p>\n<h1>Expertise and skills</h1>\n<h2>Applied Techniques</h2>\n<ol>\n<li>Clip Function: The calculate_month_trend_predicitons function includes a clip operation (pred_month.clip(54, None)) for the target variable 'updrs_4'. This ensures that the predicted month value does not go below 54.</li>\n<li>Trend Calculation: The calculate_month_trend_predicitons function calculates the trend prediction for a given month by multiplying the predicted month value with the corresponding trend factors obtained from the target_to_trend dictionary.</li>\n<li>Rounding: The calculate_predicitons_protein function rounds the trend prediction plus the protein shift value to obtain the final prediction.</li>\n<li>Optimization: The find_best_const function performs optimization using the minimize function from the SciPy library. It aims to find the best constant shift value that minimizes the metric (smape_plus_1) between the true values (y_true_array) and the predictions (y_pred) obtained by calling the calculate_predicitons_protein function with varying protein shift values.</li>\n<li>Quantile Filtering: The code applies quantile filtering to the train_clinical_all dataset for each target variable and quantile group defined in the npx_groups list. It selects a subset of data based on the quantile range specified for a particular feature. The filtered dataset is stored in train_clinical_all_filtered.</li>\n<li>Constant Shift Optimization: The find_best_const function is called within a loop for each target variable and quantile group. It uses the filtered dataset (train_clinical_all_filtered) to find the best constant shift value for that specific target and quantile group. The result is stored in the shift field of each npx_group item, and the items are appended to the target_to_npx_groups_shift dictionary.</li>\n</ol>\n<p>Overall, the code combines trend prediction, rounding, optimization, and quantile filtering techniques to calculate predictions and determine the best constant shift values for different target variables and quantile groups.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F11dcc14b4903c859aed9bc5322794ff0%2FmodelTrend%20(1).png?generation=1686732948157020&amp;alt=media\"></p>\n<pre><code>                              Fig . Predictions Trend-optimization \n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F79b454794bfe9117981eca3f2d605c97%2Fnewplot.png?generation=1686732482532612&amp;alt=media\"></p>\n<pre><code>                               .: Protein-P5060 NPX shift for UPDRS-\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F2fd66b7730b13e44790bf446e771593d%2Fnewplot%20(1).png?generation=1686732570962317&amp;alt=media\"></p>\n<pre><code>                               .: Protein-P5060 NPX shift for UPDRS-\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F9c725618a1e5e5a21380d48557005a37%2Fnewplot%20(2).png?generation=1686732574283117&amp;alt=media\"></p>\n<pre><code>                               .: Protein-P5060 NPX shift for UPDRS-\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F665f4756319abbfd04fdc076f76c5809%2Fnewplot%20(3).png?generation=1686732577285796&amp;alt=media\"></p>\n<pre><code>                               .: Protein-P5060 NPX shift for UPDRS-\n</code></pre>\n<h2>False paths, what didn’t work</h2>\n<ol>\n<li>Merging the clinical with proteins and peptide information and then adding supplementary data to it. As for supplementary data the proteins and peptide information wasn’t available so we imputed 0 for the same.</li>\n<li>We also tried finding the most expressed protein for each of the protein supergroups of O, P and Q , then used this protein in conjunction with visit features. However, this method didn't turn out to be very effective.</li>\n<li>Doing the PCA and taking only the first component with visit_id,patient_id and visit_month for training.</li>\n<li>Did cross validation with GroupKFold on patient level for splitting the data in train test and fine tuning the Random Forest model with the help of Optuna to find the best parameters and storing the fitted model for testing.</li>\n<li>The above approach used only for updrs_1, updrs_2 and updrs_3 score prediction for updrs_4 we used trend analysis to find the best trend pattern for updrs_4. Because updrs_4 was having more than 50% of null values which makes it difficult to train models for the same. </li>\n<li>With this combination of trend and model approach we got an SMAPE score of 69.8. <a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/omkarnanekarairam/pca-with-optuna-model-public-lb-score-56-7#6.-Inference</a></li>\n</ol>\n<p>However the final approach score was 69.7 which led us to get a silver medal.  <a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/omkarnanekarairam/protein-for-trend-silver-medal-approach?scriptVersionId=130051459</a></p>\n<h1>Areas to build skills in</h1>\n<p>After analyzing the competition forums and studying the approaches adopted by previous winners, several potential areas have emerged as promising targets for skill development.<br>\nWe should have done a more comprehensive EDA for the data, in order to reach the conclusion that the top rankers in the competition have , The predictive power of Proteins and peptides is as useful as random numbers<br>\nRelying on just the Pure ML and Deep Learning approaches didn’t work for this competition. Hence, Flexibility of approaches to simpler and unorthodox methods can be needed at times<br>\nWe could have utilized ANNs for modeling to capture relationships that were not being captured. </p>\n<h1>Conclusion:</h1>\n<p>Participating in this competition was a huge learning experience. The eventual result amid multiple challenges we faced, validates our team’s ability to work successfully with small, industry-specific structured dataset in Healthcare. There is still huge scope for learning and improvement in working with real-world datasets like these, hopefully helping us solve the difficult problems faced in Healthcare.</p>\n<h1>Citation:</h1>\n<p>\"In this assignment, We utilized a code snippet that was obtained from the same kaggle competition which we found as the best architecture for the competition. The code, which is responsible for Finding the trend for the updrs score and finding the best shift for proteins, was written by Vitaly Kudelya and posted on Kaggle under the username vitalykudelya. The code was accessed on 5th May and can be found at <a href=\"url\" target=\"_blank\"></a><a href=\"https://www.kaggle.com/code/vitalykudelya/protein-npx-groups-trend\" target=\"_blank\">https://www.kaggle.com/code/vitalykudelya/protein-npx-groups-trend</a> .\"</p>",
  "comments": [],
  "comment_count": 0,
  "messages": [
    {
      "id": 2302039,
      "postDate": "2023-06-14T09:50:06.470Z",
      "content": "<h1>AMP® Parkinson's Disease Progression Prediction</h1>\n<h2>Silver Medal Approach (Rank 57 Top 3%)</h2>\n<p>Authors:  <a href=\"https://www.kaggle.com/omkarnanekarairam\" target=\"_blank\">Omkar Nanekar</a> and <a href=\"https://www.kaggle.com/adityavartak\" target=\"_blank\">Aditya Vartak</a></p>\n<h1>Deconstructing the problem statement</h1>\n<h2>Motivation</h2>\n<p>Parkinson's disease (PD) is a degenerative brain disorder that significantly impairs movement, cognition, sleep, and various other normal functions. Unfortunately, there is currently no known cure for PD, and the condition progressively worsens over time. It is projected that by 2037, approximately 1.6 million people in the United States will be affected by Parkinson's disease, resulting in an economic burden nearing $80 billion. <br>\nExtensive research suggests that abnormalities in proteins or peptides play a crucial role in the onset and progression of this disease. By leveraging the power of data science, gaining a deeper understanding of these abnormalities could provide vital insights for the development of new pharmacotherapies aimed at slowing down disease progression or finding a cure for Parkinson's. Significant efforts have been made to collect complex clinical and neurobiological data from over 10,000 subjects, with the intention of sharing this valuable information with the research community. While important discoveries have emerged from this data, the identification of definitive biomarkers or curative approaches remains elusive. Therefore, investigating potential causes of Parkinson's disease is essential in the ongoing quest for a cure, as it would greatly alleviate the immense suffering endured by patients and help reduce the substantial medical care costs associated with this condition.</p>\n<h2>Problem Statement</h2>\n<p>The objective of this competition is to create a predictive model for MDS-UPDRS scores, which are used to measure the progression of Parkinson's disease in patients. The MDS-UPDRS is a comprehensive evaluation tool that assesses both motor and non-motor symptoms associated with Parkinson's. In this competition, you will develop a model that utilizes data on protein and peptide levels collected over time from subjects with Parkinson's disease and age-matched control subjects without the disease. The outcome of your work has the potential to offer valuable insights into the specific molecules that undergo changes as Parkinson's disease advances, thereby contributing to important breakthroughs in our understanding of the disease.</p>\n<table>\n<thead>\n<tr>\n<th>MDS-UPDRS-Level</th>\n<th>Cognitive impairment</th>\n<th>Hallucinations</th>\n<th>Depressed mood</th>\n<th>Anxious</th>\n<th>Apathy</th>\n<th>Dopamine Dysregulation</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Level 1</td>\n<td>Slight</td>\n<td>Rare</td>\n<td>Short spurts</td>\n<td>Short spurts</td>\n<td>Slight</td>\n<td>Rare</td>\n</tr>\n<tr>\n<td>Level 2</td>\n<td>Minimal</td>\n<td>Frequent</td>\n<td>Multiple Days</td>\n<td>Multiple Days</td>\n<td>Some activities</td>\n<td>Minor</td>\n</tr>\n<tr>\n<td>Level 3</td>\n<td>Interfering with daily activities</td>\n<td>loss of Insight</td>\n<td>Interfering with daily activities</td>\n<td>Interfering with daily activities</td>\n<td>Most activities</td>\n<td>Major</td>\n</tr>\n<tr>\n<td>Level 4</td>\n<td>Severe</td>\n<td>Delusion</td>\n<td>Severe</td>\n<td>Severe</td>\n<td>No initiative</td>\n<td>Severe</td>\n</tr>\n</tbody>\n</table>\n<pre><code>                        1:  -UPDRS  and its characteristics\n</code></pre>\n<h2>Competition Evaluation</h2>\n<p>It is a Notebooks-only submission competition. i.e submissions have to be in the form of a runnable kaggle notebook.Submissions to this competition required using the provided python time-series API, which ensures that models do not peek forward in time.</p>\n<p>The metric used is SMAPE (Symmetric mean absolute percentage error). The formula for the same is as follows:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2Fe96fb55fc713956263611ce3bdef1a6d%2FSMAPE.png?generation=1686726363879996&amp;alt=media\" alt=\"\"><br>\nDuring the competition, the metric was changed to SMAPE+1 because if actual value is zero and predicted value is &gt;1 , then SMAPE goes to 200% , which leads to unstable evaluations.  Hence  the competition hosts changed the metric to SMAPE + 1 to mitigate the impact of cases where the true UPDRS score is zero. The metric is the same as SMAPE except that we add 1 to both actual value and predicted value before calculating SMAPE.</p>\n<h2>Data</h2>\n<p>The dataset comprises protein abundance data obtained from mass spectrometry readings of cerebrospinal fluid (CSF) samples collected from Parkinson's disease (PD) patients. It includes information at both the peptide and protein level, with associated visit and patient identifiers. Clinical data such as UPDRS scores, representing PD severity, are also provided. The dataset allows for time-series analysis as patients contributed samples over multiple visits. The goal of the competition is to leverage this data to predict the progression of PD using protein abundance information. Whereas the test data set was kept hidden, so it wasn't possible to determine the counts of patients or the samples in test data. However the public leaderboard scores were based on 13% of data and remaining 87% data were used for the private and final leaderboard.</p>\n<table>\n<thead>\n<tr>\n<th>visit_id</th>\n<th>patient_id</th>\n<th>visit_month</th>\n<th>updrs_1</th>\n<th>updrs_2</th>\n<th>updrs_3</th>\n<th>updrs_4</th>\n<th>upd23b_clinical_state_on_medication</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>55_0</td>\n<td>55</td>\n<td>0</td>\n<td>10</td>\n<td>6</td>\n<td>15</td>\n<td>NaN</td>\n<td>NaN</td>\n</tr>\n<tr>\n<td>55_3</td>\n<td>55</td>\n<td>3</td>\n<td>10</td>\n<td>7</td>\n<td>25</td>\n<td>NaN</td>\n<td>NaN</td>\n</tr>\n<tr>\n<td>55_6</td>\n<td>55</td>\n<td>6</td>\n<td>8</td>\n<td>10</td>\n<td>34</td>\n<td>NaN</td>\n<td>NaN</td>\n</tr>\n<tr>\n<td>55_9</td>\n<td>55</td>\n<td>9</td>\n<td>8</td>\n<td>9</td>\n<td>30</td>\n<td>0</td>\n<td>On</td>\n</tr>\n<tr>\n<td>55_12</td>\n<td>55</td>\n<td>12</td>\n<td>10</td>\n<td>10</td>\n<td>41</td>\n<td>0</td>\n<td>On</td>\n</tr>\n</tbody>\n</table>\n<pre><code>                                   .    \n</code></pre>\n<table>\n<thead>\n<tr>\n<th>visit_id</th>\n<th>visit_month</th>\n<th>patient_id</th>\n<th>UniProt</th>\n<th>NPX</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00391</td>\n<td>11254.3</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>732430</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00584</td>\n<td>39585.8</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O14498</td>\n<td>41526.9</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O14773</td>\n<td>31238</td>\n</tr>\n</tbody>\n</table>\n<pre><code>                                   .    \n</code></pre>\n<table>\n<thead>\n<tr>\n<th>visit_id</th>\n<th>visit_month</th>\n<th>patient_id</th>\n<th>UniProt</th>\n<th>Peptide</th>\n<th>PeptideAbundance</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00391</td>\n<td>NEQEQPLGQWHLS</td>\n<td>11254.3</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>GNPEPTFSWTK</td>\n<td>102060</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>IEIPSSVQQVPTIIK</td>\n<td>174185</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>KPQSAVYSTGSNGILLC(UniMod_4)EAEGEPQPTIK</td>\n<td>27278.9</td>\n</tr>\n<tr>\n<td>55_0</td>\n<td>0</td>\n<td>55</td>\n<td>O00533</td>\n<td>SMEQNGPGLEYR</td>\n<td>30838.7</td>\n</tr>\n</tbody>\n</table>\n<pre><code>                                   .    \n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F87283515bf56fa4b8903d9b42a84e1a2%2FAMP%20PPDP%20Appraoch(1).drawio.png?generation=1686735659764230&amp;alt=media\"></p>\n<pre><code>                                    . Our Approach\n</code></pre>\n<h1>Overview of Final Approach</h1>\n<h2>Training</h2>\n<p>Fig. 1 Depicts the flow we followed in our best approach for the competition. To improve our performance in the competition, we adopted the following strategy:</p>\n<ol>\n<li>Exploratory Experiments: We conducted a series of initial experiments using various pre-trained approaches. This allowed us to quickly identify the most effective architectures for our task.</li>\n<li>Advanced Techniques: Once we identified the promising architectures, we applied advanced techniques such as fine-tuning, changing the cross validation steps, proteins and peptide information. This iterative process helped us optimize the models further.</li>\n<li>Change in target: As the problem was to predict the 4 UPDRS scores(i.e updrs_1,updrs_2,updrs_3 and updrs_4) based on the time series of patients. To do this we adapted the architecture where we focus on finding the trend of the target among the time period. In summary, we calculated trends for different targets based on a dataset by finding the optimal trend values that minimize the difference between the true values and the predictions. The results are stored in a dictionary for each target to use later for predictions on test data.</li>\n<li>Protein Information Extraction: From the Pearson correlation among all 4 updrs scores and provided 229 proteins. Then took the average among all 4 updrs scores and picked up the top one to proceed further. We then used this protein with the trend found for the updrs score to find out the shift in protein with time. To do this we calculated the optimal protein shift for different quantile ranges and targets. We did this by filtering the dataset based on the quantile ranges like  {'quantile_low': 0.0, 'quantile_high': 0.03}, {'quantile_low': 0.06, 'quantile_high': 0.98}, {'quantile_low': 0.94, 'quantile_high': 1.0}, for finding the best protein shift using an optimization algorithm, and storing the results in a dictionary.</li>\n<li>Model Ensemble: After finding the best shifts for protein and trend value for updrs scores we used this information for prediction for test score. For prediction of the score, we rounded the scores to the nearest whole number. </li>\n</ol>\n<p>In summary, we used the provided API to iterate over the test data and combine protein features with other relevant information. Then fill the NA values by the forward fill method. Then, calculated ratings for different targets based on prediction months and trend values. The ratings then are adjusted based on protein values within specific quantile ranges. By employing this approach, we achieved a significant boost in our predictions and obtained the final prediction for the competition.</p>\n<h2>Cross-Validation</h2>\n<p>As test data doesn’t contain any patient data from the training set, to perform the cross-validation we cannot use time-series based approaches, instead we used the cross validation with GroupKFold level on patient_id. We did the above in order to avoid the patients in our train data to be a part of our test data, thus avoiding data leakage</p>\n<h1>Expertise and skills</h1>\n<h2>Applied Techniques</h2>\n<ol>\n<li>Clip Function: The calculate_month_trend_predicitons function includes a clip operation (pred_month.clip(54, None)) for the target variable 'updrs_4'. This ensures that the predicted month value does not go below 54.</li>\n<li>Trend Calculation: The calculate_month_trend_predicitons function calculates the trend prediction for a given month by multiplying the predicted month value with the corresponding trend factors obtained from the target_to_trend dictionary.</li>\n<li>Rounding: The calculate_predicitons_protein function rounds the trend prediction plus the protein shift value to obtain the final prediction.</li>\n<li>Optimization: The find_best_const function performs optimization using the minimize function from the SciPy library. It aims to find the best constant shift value that minimizes the metric (smape_plus_1) between the true values (y_true_array) and the predictions (y_pred) obtained by calling the calculate_predicitons_protein function with varying protein shift values.</li>\n<li>Quantile Filtering: The code applies quantile filtering to the train_clinical_all dataset for each target variable and quantile group defined in the npx_groups list. It selects a subset of data based on the quantile range specified for a particular feature. The filtered dataset is stored in train_clinical_all_filtered.</li>\n<li>Constant Shift Optimization: The find_best_const function is called within a loop for each target variable and quantile group. It uses the filtered dataset (train_clinical_all_filtered) to find the best constant shift value for that specific target and quantile group. The result is stored in the shift field of each npx_group item, and the items are appended to the target_to_npx_groups_shift dictionary.</li>\n</ol>\n<p>Overall, the code combines trend prediction, rounding, optimization, and quantile filtering techniques to calculate predictions and determine the best constant shift values for different target variables and quantile groups.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F11dcc14b4903c859aed9bc5322794ff0%2FmodelTrend%20(1).png?generation=1686732948157020&amp;alt=media\"></p>\n<pre><code>                              Fig . Predictions Trend-optimization \n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F79b454794bfe9117981eca3f2d605c97%2Fnewplot.png?generation=1686732482532612&amp;alt=media\"></p>\n<pre><code>                               .: Protein-P5060 NPX shift for UPDRS-\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F2fd66b7730b13e44790bf446e771593d%2Fnewplot%20(1).png?generation=1686732570962317&amp;alt=media\"></p>\n<pre><code>                               .: Protein-P5060 NPX shift for UPDRS-\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F9c725618a1e5e5a21380d48557005a37%2Fnewplot%20(2).png?generation=1686732574283117&amp;alt=media\"></p>\n<pre><code>                               .: Protein-P5060 NPX shift for UPDRS-\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F665f4756319abbfd04fdc076f76c5809%2Fnewplot%20(3).png?generation=1686732577285796&amp;alt=media\"></p>\n<pre><code>                               .: Protein-P5060 NPX shift for UPDRS-\n</code></pre>\n<h2>False paths, what didn’t work</h2>\n<ol>\n<li>Merging the clinical with proteins and peptide information and then adding supplementary data to it. As for supplementary data the proteins and peptide information wasn’t available so we imputed 0 for the same.</li>\n<li>We also tried finding the most expressed protein for each of the protein supergroups of O, P and Q , then used this protein in conjunction with visit features. However, this method didn't turn out to be very effective.</li>\n<li>Doing the PCA and taking only the first component with visit_id,patient_id and visit_month for training.</li>\n<li>Did cross validation with GroupKFold on patient level for splitting the data in train test and fine tuning the Random Forest model with the help of Optuna to find the best parameters and storing the fitted model for testing.</li>\n<li>The above approach used only for updrs_1, updrs_2 and updrs_3 score prediction for updrs_4 we used trend analysis to find the best trend pattern for updrs_4. Because updrs_4 was having more than 50% of null values which makes it difficult to train models for the same. </li>\n<li>With this combination of trend and model approach we got an SMAPE score of 69.8. <a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/omkarnanekarairam/pca-with-optuna-model-public-lb-score-56-7#6.-Inference</a></li>\n</ol>\n<p>However the final approach score was 69.7 which led us to get a silver medal.  <a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/omkarnanekarairam/protein-for-trend-silver-medal-approach?scriptVersionId=130051459</a></p>\n<h1>Areas to build skills in</h1>\n<p>After analyzing the competition forums and studying the approaches adopted by previous winners, several potential areas have emerged as promising targets for skill development.<br>\nWe should have done a more comprehensive EDA for the data, in order to reach the conclusion that the top rankers in the competition have , The predictive power of Proteins and peptides is as useful as random numbers<br>\nRelying on just the Pure ML and Deep Learning approaches didn’t work for this competition. Hence, Flexibility of approaches to simpler and unorthodox methods can be needed at times<br>\nWe could have utilized ANNs for modeling to capture relationships that were not being captured. </p>\n<h1>Conclusion:</h1>\n<p>Participating in this competition was a huge learning experience. The eventual result amid multiple challenges we faced, validates our team’s ability to work successfully with small, industry-specific structured dataset in Healthcare. There is still huge scope for learning and improvement in working with real-world datasets like these, hopefully helping us solve the difficult problems faced in Healthcare.</p>\n<h1>Citation:</h1>\n<p>\"In this assignment, We utilized a code snippet that was obtained from the same kaggle competition which we found as the best architecture for the competition. The code, which is responsible for Finding the trend for the updrs score and finding the best shift for proteins, was written by Vitaly Kudelya and posted on Kaggle under the username vitalykudelya. The code was accessed on 5th May and can be found at <a href=\"url\" target=\"_blank\"></a><a href=\"https://www.kaggle.com/code/vitalykudelya/protein-npx-groups-trend\" target=\"_blank\">https://www.kaggle.com/code/vitalykudelya/protein-npx-groups-trend</a> .\"</p>",
      "rawMarkdown": "# AMP® Parkinson's Disease Progression Prediction\n\n## Silver Medal Approach (Rank 57 Top 3%)\nAuthors:  [Omkar Nanekar](https://www.kaggle.com/omkarnanekarairam) and [Aditya Vartak](https://www.kaggle.com/adityavartak)\n\n# Deconstructing the problem statement\n## Motivation\nParkinson's disease (PD) is a degenerative brain disorder that significantly impairs movement, cognition, sleep, and various other normal functions. Unfortunately, there is currently no known cure for PD, and the condition progressively worsens over time. It is projected that by 2037, approximately 1.6 million people in the United States will be affected by Parkinson's disease, resulting in an economic burden nearing $80 billion. \nExtensive research suggests that abnormalities in proteins or peptides play a crucial role in the onset and progression of this disease. By leveraging the power of data science, gaining a deeper understanding of these abnormalities could provide vital insights for the development of new pharmacotherapies aimed at slowing down disease progression or finding a cure for Parkinson's. Significant efforts have been made to collect complex clinical and neurobiological data from over 10,000 subjects, with the intention of sharing this valuable information with the research community. While important discoveries have emerged from this data, the identification of definitive biomarkers or curative approaches remains elusive. Therefore, investigating potential causes of Parkinson's disease is essential in the ongoing quest for a cure, as it would greatly alleviate the immense suffering endured by patients and help reduce the substantial medical care costs associated with this condition.\n## Problem Statement\nThe objective of this competition is to create a predictive model for MDS-UPDRS scores, which are used to measure the progression of Parkinson's disease in patients. The MDS-UPDRS is a comprehensive evaluation tool that assesses both motor and non-motor symptoms associated with Parkinson's. In this competition, you will develop a model that utilizes data on protein and peptide levels collected over time from subjects with Parkinson's disease and age-matched control subjects without the disease. The outcome of your work has the potential to offer valuable insights into the specific molecules that undergo changes as Parkinson's disease advances, thereby contributing to important breakthroughs in our understanding of the disease.\n\n| MDS-UPDRS-Level | Cognitive impairment              | Hallucinations  | Depressed mood                    | Anxious                           | Apathy          | Dopamine Dysregulation |\n| :-------------: | :-------------------------------: | :-------------: | :-------------------------------: | :-------------------------------: | :-------------: | :--------------------: |\n|     Level 1     |              Slight               |       Rare      |        Short spurts               |        Short spurts               |      Slight      |          Rare          |\n|     Level 2     |             Minimal               |    Frequent     |        Multiple Days              |        Multiple Days              | Some activities |         Minor          |\n|     Level 3     | Interfering with daily activities | loss of Insight | Interfering with daily activities | Interfering with daily activities | Most activities |         Major          |\n|     Level 4     |             Severe                |     Delusion    |             Severe                |             Severe                | No initiative   |         Severe         |\n\n\n                           Table 1:  MDS-UPDRS Levels and its characteristics\n\n## Competition Evaluation\nIt is a Notebooks-only submission competition. i.e submissions have to be in the form of a runnable kaggle notebook.Submissions to this competition required using the provided python time-series API, which ensures that models do not peek forward in time.\n\nThe metric used is SMAPE (Symmetric mean absolute percentage error). The formula for the same is as follows:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2Fe96fb55fc713956263611ce3bdef1a6d%2FSMAPE.png?generation=1686726363879996&alt=media)\nDuring the competition, the metric was changed to SMAPE+1 because if actual value is zero and predicted value is >1 , then SMAPE goes to 200% , which leads to unstable evaluations.  Hence  the competition hosts changed the metric to SMAPE + 1 to mitigate the impact of cases where the true UPDRS score is zero. The metric is the same as SMAPE except that we add 1 to both actual value and predicted value before calculating SMAPE.\n\n## Data\nThe dataset comprises protein abundance data obtained from mass spectrometry readings of cerebrospinal fluid (CSF) samples collected from Parkinson's disease (PD) patients. It includes information at both the peptide and protein level, with associated visit and patient identifiers. Clinical data such as UPDRS scores, representing PD severity, are also provided. The dataset allows for time-series analysis as patients contributed samples over multiple visits. The goal of the competition is to leverage this data to predict the progression of PD using protein abundance information. Whereas the test data set was kept hidden, so it wasn't possible to determine the counts of patients or the samples in test data. However the public leaderboard scores were based on 13% of data and remaining 87% data were used for the private and final leaderboard.\n\n| visit_id | patient_id | visit_month | updrs_1 | updrs_2 | updrs_3 | updrs_4 | upd23b_clinical_state_on_medication |\n| -------- | ---------- | ----------- | ------- | ------- | ------- | ------- | ----------------------------------- |\n| 55_0     | 55         | 0           | 10      | 6       | 15      | NaN     | NaN                                 |\n| 55_3     | 55         | 3           | 10      | 7       | 25      | NaN     | NaN                                 |\n| 55_6     | 55         | 6           | 8       | 10      | 34      | NaN     | NaN                                 |\n| 55_9     | 55         | 9           | 8       | 9       | 30      | 0       | On                                  |\n| 55_12    | 55         | 12          | 10      | 10      | 41      | 0       | On                                  |\n\n\n                                       2.1. Overview of Clinical data.\n\n| visit_id        | visit_month          | patient_id             | UniProt      | NPX                  |\n| -------- | ----------- | ---------- | ------- | ------- |\n| 55_0     | 0           | 55         | O00391  | 11254.3 |\n| 55_0     | 0           | 55         | O00533  | 732430  |\n| 55_0     | 0           | 55         | O00584  | 39585.8 |\n| 55_0     | 0           | 55         | O14498  | 41526.9 |\n| 55_0     | 0           | 55         | O14773  | 31238   |\n\n                                       2.2. Overview of Protein data.\n\n| visit_id | visit_month | patient_id | UniProt | Peptide                                | PeptideAbundance |\n| -------- | ----------- | ---------- | ------- | -------------------------------------- | ---------------- |\n| 55_0     | 0           | 55         | O00391  | NEQEQPLGQWHLS                          | 11254.3          |\n| 55_0     | 0           | 55         | O00533  | GNPEPTFSWTK                            | 102060           |\n| 55_0     | 0           | 55         | O00533  | IEIPSSVQQVPTIIK                        | 174185           |\n| 55_0     | 0           | 55         | O00533  | KPQSAVYSTGSNGILLC(UniMod_4)EAEGEPQPTIK | 27278.9          |\n| 55_0     | 0           | 55         | O00533  | SMEQNGPGLEYR                           | 30838.7          |\n\n                                       2.3. Overview of Peptide data\n\n\n<img src = \"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F87283515bf56fa4b8903d9b42a84e1a2%2FAMP%20PPDP%20Appraoch(1).drawio.png?generation=1686735659764230&alt=media\" width=\"100%\" height=\"100%\">\n\n                                       Fig 1. Our Approach\n\n\n# Overview of Final Approach\n## Training \nFig. 1 Depicts the flow we followed in our best approach for the competition. To improve our performance in the competition, we adopted the following strategy:\n\n1. Exploratory Experiments: We conducted a series of initial experiments using various pre-trained approaches. This allowed us to quickly identify the most effective architectures for our task.\n2. Advanced Techniques: Once we identified the promising architectures, we applied advanced techniques such as fine-tuning, changing the cross validation steps, proteins and peptide information. This iterative process helped us optimize the models further.\n3. Change in target: As the problem was to predict the 4 UPDRS scores(i.e updrs_1,updrs_2,updrs_3 and updrs_4) based on the time series of patients. To do this we adapted the architecture where we focus on finding the trend of the target among the time period. In summary, we calculated trends for different targets based on a dataset by finding the optimal trend values that minimize the difference between the true values and the predictions. The results are stored in a dictionary for each target to use later for predictions on test data.\n4. Protein Information Extraction: From the Pearson correlation among all 4 updrs scores and provided 229 proteins. Then took the average among all 4 updrs scores and picked up the top one to proceed further. We then used this protein with the trend found for the updrs score to find out the shift in protein with time. To do this we calculated the optimal protein shift for different quantile ranges and targets. We did this by filtering the dataset based on the quantile ranges like  {'quantile_low': 0.0, 'quantile_high': 0.03}, {'quantile_low': 0.06, 'quantile_high': 0.98}, {'quantile_low': 0.94, 'quantile_high': 1.0}, for finding the best protein shift using an optimization algorithm, and storing the results in a dictionary.\n5. Model Ensemble: After finding the best shifts for protein and trend value for updrs scores we used this information for prediction for test score. For prediction of the score, we rounded the scores to the nearest whole number. \n\nIn summary, we used the provided API to iterate over the test data and combine protein features with other relevant information. Then fill the NA values by the forward fill method. Then, calculated ratings for different targets based on prediction months and trend values. The ratings then are adjusted based on protein values within specific quantile ranges. By employing this approach, we achieved a significant boost in our predictions and obtained the final prediction for the competition.\n\n\n\n\n## Cross-Validation \nAs test data doesn’t contain any patient data from the training set, to perform the cross-validation we cannot use time-series based approaches, instead we used the cross validation with GroupKFold level on patient_id. We did the above in order to avoid the patients in our train data to be a part of our test data, thus avoiding data leakage\n\n# Expertise and skills\n## Applied Techniques\n1. Clip Function: The calculate_month_trend_predicitons function includes a clip operation (pred_month.clip(54, None)) for the target variable 'updrs_4'. This ensures that the predicted month value does not go below 54.\n2. Trend Calculation: The calculate_month_trend_predicitons function calculates the trend prediction for a given month by multiplying the predicted month value with the corresponding trend factors obtained from the target_to_trend dictionary.\n3. Rounding: The calculate_predicitons_protein function rounds the trend prediction plus the protein shift value to obtain the final prediction.\n4. Optimization: The find_best_const function performs optimization using the minimize function from the SciPy library. It aims to find the best constant shift value that minimizes the metric (smape_plus_1) between the true values (y_true_array) and the predictions (y_pred) obtained by calling the calculate_predicitons_protein function with varying protein shift values.\n5. Quantile Filtering: The code applies quantile filtering to the train_clinical_all dataset for each target variable and quantile group defined in the npx_groups list. It selects a subset of data based on the quantile range specified for a particular feature. The filtered dataset is stored in train_clinical_all_filtered.\n6. Constant Shift Optimization: The find_best_const function is called within a loop for each target variable and quantile group. It uses the filtered dataset (train_clinical_all_filtered) to find the best constant shift value for that specific target and quantile group. The result is stored in the shift field of each npx_group item, and the items are appended to the target_to_npx_groups_shift dictionary.\n\nOverall, the code combines trend prediction, rounding, optimization, and quantile filtering techniques to calculate predictions and determine the best constant shift values for different target variables and quantile groups.\n\n\n <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F11dcc14b4903c859aed9bc5322794ff0%2FmodelTrend%20(1).png?generation=1686732948157020&alt=media\" width=\"100%\" height=\"100%\">\n\n                                  Fig 2. Predictions by Trend-Based optimization \n\n <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F79b454794bfe9117981eca3f2d605c97%2Fnewplot.png?generation=1686732482532612&alt=media\" width=\"100%\" height=\"100%\">\n\n                                  Fig 3.1: Protein-P5060 NPX shift for UPDRS-1\n\n <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F2fd66b7730b13e44790bf446e771593d%2Fnewplot%20(1).png?generation=1686732570962317&alt=media\" width=\"100%\" height=\"100%\">\n                                  \n                                  Fig 3.2: Protein-P5060 NPX shift for UPDRS-2\n\n <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F9c725618a1e5e5a21380d48557005a37%2Fnewplot%20(2).png?generation=1686732574283117&alt=media\" width=\"100%\" height=\"100%\">\n                                       \n                                  Fig 3.3: Protein-P5060 NPX shift for UPDRS-3\n\n <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F14390726%2F665f4756319abbfd04fdc076f76c5809%2Fnewplot%20(3).png?generation=1686732577285796&alt=media\" width=\"100%\" height=\"100%\">\n\n                                  Fig 3.4: Protein-P5060 NPX shift for UPDRS-4\n\n\n## False paths, what didn’t work\n1. Merging the clinical with proteins and peptide information and then adding supplementary data to it. As for supplementary data the proteins and peptide information wasn’t available so we imputed 0 for the same.\n2. We also tried finding the most expressed protein for each of the protein supergroups of O, P and Q , then used this protein in conjunction with visit features. However, this method didn't turn out to be very effective.\n3. Doing the PCA and taking only the first component with visit_id,patient_id and visit_month for training.\n4. Did cross validation with GroupKFold on patient level for splitting the data in train test and fine tuning the Random Forest model with the help of Optuna to find the best parameters and storing the fitted model for testing.\n5. The above approach used only for updrs_1, updrs_2 and updrs_3 score prediction for updrs_4 we used trend analysis to find the best trend pattern for updrs_4. Because updrs_4 was having more than 50% of null values which makes it difficult to train models for the same. \n6. With this combination of trend and model approach we got an SMAPE score of 69.8. [https://www.kaggle.com/code/omkarnanekarairam/pca-with-optuna-model-public-lb-score-56-7#6.-Inference](url)\n\nHowever the final approach score was 69.7 which led us to get a silver medal.  [https://www.kaggle.com/code/omkarnanekarairam/protein-for-trend-silver-medal-approach?scriptVersionId=130051459](url)\n\n\n\n\n# Areas to build skills in\nAfter analyzing the competition forums and studying the approaches adopted by previous winners, several potential areas have emerged as promising targets for skill development.\nWe should have done a more comprehensive EDA for the data, in order to reach the conclusion that the top rankers in the competition have , The predictive power of Proteins and peptides is as useful as random numbers\nRelying on just the Pure ML and Deep Learning approaches didn’t work for this competition. Hence, Flexibility of approaches to simpler and unorthodox methods can be needed at times\nWe could have utilized ANNs for modeling to capture relationships that were not being captured. \n\n# Conclusion:\nParticipating in this competition was a huge learning experience. The eventual result amid multiple challenges we faced, validates our team’s ability to work successfully with small, industry-specific structured dataset in Healthcare. There is still huge scope for learning and improvement in working with real-world datasets like these, hopefully helping us solve the difficult problems faced in Healthcare.\n\n# Citation:\n\n\"In this assignment, We utilized a code snippet that was obtained from the same kaggle competition which we found as the best architecture for the competition. The code, which is responsible for Finding the trend for the updrs score and finding the best shift for proteins, was written by Vitaly Kudelya and posted on Kaggle under the username vitalykudelya. The code was accessed on 5th May and can be found at [https://www.kaggle.com/code/vitalykudelya/protein-npx-groups-trend .\"](url)\n",
      "votes": 1
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T14:13:07Z",
  "competition_id": 37794,
  "competition_slug": "amp-parkinsons-disease-progression-prediction",
  "team_id": 10137109,
  "solution_url": "/competitions/amp-parkinsons-disease-progression-prediction/writeups/airaavengers-silver-medal-approach-aira-matrix"
}