{
  "id": 127543,
  "title": "21st place solution (link to R kernel)",
  "content": "<p>First at all, thanks to the BS Kids and Kaggle teams for this great competition and congratulations to the winners and medallists.</p>\n\n<p>I couldn't work in this competition as much as how I would have liked so it's felt really good to get a medal. It's a bit disappointing to be so close to gold but I can't complain as my solution is very simple and I think I was lucky with the final result.</p>\n\n<h2>Feature engineering</h2>\n\n<p>I generated 754 features, most of them very similar to the ones you can find in public kernels. For sessions of the type \"Game\" I created features taking account the different rounds (most games have three rounds).</p>\n\n<h2>Feature elimination</h2>\n\n<p>I only drop duplicated and very similar (&gt;.99 equal values) variables. I ended with 649 features.</p>\n\n<h2>Model</h2>\n\n<p>I used the <a href=\"https://www.kaggle.com/c/prudential-life-insurance-assessment/discussion/19010\">1st place solution</a> and the <a href=\"https://www.kaggle.com/c/prudential-life-insurance-assessment/discussion/19003\">2nd place solution</a> of the <a href=\"https://www.kaggle.com/c/prudential-life-insurance-assessment\">Prudential Life competition</a> as inspiration. My model consist of, first, three lgb binary classifiers (0 vs 123, 01 vs 23, 012 vs 3) with 5-Fold CV.  Then, I use the results of these models plus the assessment title as features of a linear regression model to get the final continuous prediction.</p>\n\n<h2>Threshold definition</h2>\n\n<p>I use the <code>optim</code> R function with the Nelder-Mead algorithm. To get the initial coefficients I used the golden section method that is explained <a href=\"https://www.kaggle.com/c/petfinder-adoption-prediction/discussion/76107#480970\">here.</a> I usually got a better score with this two step process that using any of this two methods on their own. </p>\n\n<h2>.</h2>\n\n<p>You can see the kernel <a href=\"https://www.kaggle.com/artmatician/21st-place-solution?scriptVersionId=27558325\">here</a>.</p>",
  "comments": [
    {
      "id": 728350,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-01-24T16:30:47.153000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 729698,
          "author_name": "Arturo Garcia",
          "author_url": "",
          "post_date": "2020-01-26T14:40:18.097000",
          "content": "<p>Thanks!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 735045,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-02-02T12:42:04.297000",
      "content": "<p>Thanks for sharing.</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "comment_count": 3,
  "messages": [
    {
      "id": 728317,
      "postDate": "2020-01-24T15:49:02.943Z",
      "content": "<p>First at all, thanks to the BS Kids and Kaggle teams for this great competition and congratulations to the winners and medallists.</p>\n\n<p>I couldn't work in this competition as much as how I would have liked so it's felt really good to get a medal. It's a bit disappointing to be so close to gold but I can't complain as my solution is very simple and I think I was lucky with the final result.</p>\n\n<h2>Feature engineering</h2>\n\n<p>I generated 754 features, most of them very similar to the ones you can find in public kernels. For sessions of the type \"Game\" I created features taking account the different rounds (most games have three rounds).</p>\n\n<h2>Feature elimination</h2>\n\n<p>I only drop duplicated and very similar (&gt;.99 equal values) variables. I ended with 649 features.</p>\n\n<h2>Model</h2>\n\n<p>I used the <a href=\"https://www.kaggle.com/c/prudential-life-insurance-assessment/discussion/19010\">1st place solution</a> and the <a href=\"https://www.kaggle.com/c/prudential-life-insurance-assessment/discussion/19003\">2nd place solution</a> of the <a href=\"https://www.kaggle.com/c/prudential-life-insurance-assessment\">Prudential Life competition</a> as inspiration. My model consist of, first, three lgb binary classifiers (0 vs 123, 01 vs 23, 012 vs 3) with 5-Fold CV.  Then, I use the results of these models plus the assessment title as features of a linear regression model to get the final continuous prediction.</p>\n\n<h2>Threshold definition</h2>\n\n<p>I use the <code>optim</code> R function with the Nelder-Mead algorithm. To get the initial coefficients I used the golden section method that is explained <a href=\"https://www.kaggle.com/c/petfinder-adoption-prediction/discussion/76107#480970\">here.</a> I usually got a better score with this two step process that using any of this two methods on their own. </p>\n\n<h2>.</h2>\n\n<p>You can see the kernel <a href=\"https://www.kaggle.com/artmatician/21st-place-solution?scriptVersionId=27558325\">here</a>.</p>",
      "rawMarkdown": "First at all, thanks to the BS Kids and Kaggle teams for this great competition and congratulations to the winners and medallists.\n\nI couldn't work in this competition as much as how I would have liked so it's felt really good to get a medal. It's a bit disappointing to be so close to gold but I can't complain as my solution is very simple and I think I was lucky with the final result.\n\n\n## Feature engineering\nI generated 754 features, most of them very similar to the ones you can find in public kernels. For sessions of the type \"Game\" I created features taking account the different rounds (most games have three rounds).\n\n## Feature elimination\nI only drop duplicated and very similar (&gt;.99 equal values) variables. I ended with 649 features.\n\n## Model    \nI used the [1st place solution](https://www.kaggle.com/c/prudential-life-insurance-assessment/discussion/19010) and the [2nd place solution](https://www.kaggle.com/c/prudential-life-insurance-assessment/discussion/19003) of the [Prudential Life competition](https://www.kaggle.com/c/prudential-life-insurance-assessment) as inspiration. My model consist of, first, three lgb binary classifiers (0 vs 123, 01 vs 23, 012 vs 3) with 5-Fold CV.  Then, I use the results of these models plus the assessment title as features of a linear regression model to get the final continuous prediction.\n\n## Threshold definition\nI use the `optim` R function with the Nelder-Mead algorithm. To get the initial coefficients I used the golden section method that is explained [here.](https://www.kaggle.com/c/petfinder-adoption-prediction/discussion/76107#480970) I usually got a better score with this two step process that using any of this two methods on their own. \n\n##.\nYou can see the kernel [here](https://www.kaggle.com/artmatician/21st-place-solution?scriptVersionId=27558325).",
      "votes": 9
    },
    {
      "id": 728350,
      "postDate": "2020-01-24T16:30:47.153Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 729698,
          "postDate": "2020-01-26T14:40:18.097Z",
          "content": "<p>Thanks!</p>",
          "rawMarkdown": "Thanks!"
        }
      ]
    },
    {
      "id": 735045,
      "postDate": "2020-02-02T12:42:04.297Z",
      "content": "<p>Thanks for sharing.</p>",
      "rawMarkdown": "Thanks for sharing.",
      "votes": 1
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-22T10:52:59Z",
  "competition_id": 16531,
  "competition_slug": "data-science-bowl-2019",
  "team_id": 4053523,
  "solution_url": "/competitions/data-science-bowl-2019/writeups/arturo-garcia-21st-place-solution-link-to-r-kernel"
}