{
  "id": 312079,
  "title": "[18th place] Solution",
  "content": "<p>Thank you all, who shared discussions and notebooks, it was really interesting to read them, I learned a lot. Also, thank you to the organizers for this important competition for the world! Unfortunately, I was able to participate for 1-2 days, because of others competitions. </p>\n<p>Generally, when I just saw the dataset, I understood that the dataset is too small to build deep models, because of the chance of overfitting. So, my main care was for Feature Engineering and Regulization. </p>\n<h3>Feature Engineering</h3>\n<ul>\n<li><code>continent</code>: all we know, is that sometimes autism disease oftener appears in some regions, like Africa, North America, North russia (not a mistake), etc, so it is important to include this factor. CV +0.002.<br>\n<img src=\"https://i.ibb.co/ym9qyjn/1537972914587.webp\" alt=\"1537972914587\"></li>\n<li><code>alpha frequency</code>: the count of <code>An_score</code> being the <code>1</code>. (count 1) / 10. CV +0.001.</li>\n<li><code>age binning</code>: binning of the <code>age</code> to 25 bins. CV + ~0.003.</li>\n</ul>\n<h3>Pre-processing</h3>\n<p>I just do the Target Encoding with quite strong regulization (smoothing 0.2) to prevent overfitting. CV +0.001</p>\n<h3>Cross Validation</h3>\n<p>I validated my models with the usual Stratified Cross-Validation (5 folds).</p>\n<h3>Modeling</h3>\n<p>My choice, as always, was the CatBoost, I am choosing it, because it is easy to train it in GPU and with quite strong regulization, it can beet the XGBoost and LightGBM models.  I stopped with the small number of iterations (1000), max depth (5), and learning rate (1e-3), yet again, to prevent overfitting, because the dataset is too small. Also, I added the <code>scale_pos_weight</code> parameter, which applies the weights of classes for objective function/cost functions/loss, so the formula is just the frequencies of classes (count samples of certain class/all samples). In the binary classification task, it is just needed the weight for the positive class. It gives me ``<br>\nSo here are my parameters for the model:</p>\n<pre><code>SEED  = 42\n\nclasses, counts = np.unique(train_targets, return_counts=True)\npos_weight = (counts[-1] / sum(counts))\n\nmodel_parameters = {\n    \"min_data_in_leaf\": 250,\n    \"learning_rate\": 1e-3,\n    \"random_seed\": SEED,\n    \"max_depth\": 5,\n    \"verbose\": 100,\n    \"iterations\": 1000,\n    \"eval_metric\": \"AUC\",\n    \"early_stopping_rounds\": 250,\n    \"scale_pos_weight\": pos_weight,\n}\n</code></pre>\n<p>That's all! Thank you for reading! </p>",
  "comments": [
    {
      "id": 1717940,
      "author_name": "A Legacy Grandmaster!",
      "author_url": "",
      "post_date": "2022-03-10T11:18:33.787000",
      "content": "<p><a href=\"https://www.kaggle.com/vad13irt\" target=\"_blank\">@vad13irt</a> ,</p>\n<p>Thank you for sharing your solution approach! <br>\nHowever, I would be more careful with some of the wording you have used to describe some of the continents. <code>Cheap region</code> is a little condescending. </p>\n<blockquote>\n  <p>all we know, is that sometimes autism disease often appears in the cheap region, like Africa, North America…</p>\n</blockquote>\n<p>Underdeveloped, developing regions, 3rd world countries etc. would be more appropriate in my opinion. </p>\n<p>Thanks for the solution again!</p>",
      "votes": 3,
      "replies": [
        {
          "id": 1717943,
          "author_name": "Vadim Irtlach",
          "author_url": "",
          "post_date": "2022-03-10T11:21:31.890000",
          "content": "<p>Thank you for your comment. I understand what are you talking about, I hope, my words don't offend anyone, because I meant something else, you know.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1717945,
          "author_name": "Vadim Irtlach",
          "author_url": "",
          "post_date": "2022-03-10T11:22:35.667000",
          "content": "<p>I updated. Thank you, <a href=\"https://www.kaggle.com/desalegngeb\" target=\"_blank\">@desalegngeb</a>! </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1717949,
          "author_name": "A Legacy Grandmaster!",
          "author_url": "",
          "post_date": "2022-03-10T11:26:02.180000",
          "content": "<p>Thank you and stay safe!</p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 1719857,
      "author_name": "Ishan Mehta115",
      "author_url": "",
      "post_date": "2022-03-12T07:57:11.103000",
      "content": "<p>This is great</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1718296,
      "author_name": "Santhoshkumar",
      "author_url": "",
      "post_date": "2022-03-10T17:47:38.337000",
      "content": "<p>CV + 0.002 how you come up with factor eg - 0.002? </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1718310,
          "author_name": "Vadim Irtlach",
          "author_url": "",
          "post_date": "2022-03-10T18:00:44.800000",
          "content": "<p>I wrote down how much each change gave me. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1718545,
          "author_name": "Santhoshkumar",
          "author_url": "",
          "post_date": "2022-03-11T00:13:39.090000",
          "content": "<p>Thats great👍</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1718133,
      "author_name": "Kishore S",
      "author_url": "",
      "post_date": "2022-03-10T14:32:08.377000",
      "content": "<p>Thank you so much for the summary <a href=\"https://www.kaggle.com/vad13irt\" target=\"_blank\">@vad13irt</a>. I have also used a similar sort of feature engineering approach. As you have mentioned feature engineering was the key to this competition.</p>\n<p>My baseline scikit-learn's Logistic regression model with default parameters &amp; same feature engineering as my best solution would still have been the 8th place solution (Private LB: 0.98051). But I have not &amp; would have never selected it for submission 😄.</p>",
      "votes": 2,
      "replies": []
    }
  ],
  "comment_count": 9,
  "messages": [
    {
      "id": 1717837,
      "postDate": "2022-03-10T09:02:07.160Z",
      "content": "<p>Thank you all, who shared discussions and notebooks, it was really interesting to read them, I learned a lot. Also, thank you to the organizers for this important competition for the world! Unfortunately, I was able to participate for 1-2 days, because of others competitions. </p>\n<p>Generally, when I just saw the dataset, I understood that the dataset is too small to build deep models, because of the chance of overfitting. So, my main care was for Feature Engineering and Regulization. </p>\n<h3>Feature Engineering</h3>\n<ul>\n<li><code>continent</code>: all we know, is that sometimes autism disease oftener appears in some regions, like Africa, North America, North russia (not a mistake), etc, so it is important to include this factor. CV +0.002.<br>\n<img src=\"https://i.ibb.co/ym9qyjn/1537972914587.webp\" alt=\"1537972914587\"></li>\n<li><code>alpha frequency</code>: the count of <code>An_score</code> being the <code>1</code>. (count 1) / 10. CV +0.001.</li>\n<li><code>age binning</code>: binning of the <code>age</code> to 25 bins. CV + ~0.003.</li>\n</ul>\n<h3>Pre-processing</h3>\n<p>I just do the Target Encoding with quite strong regulization (smoothing 0.2) to prevent overfitting. CV +0.001</p>\n<h3>Cross Validation</h3>\n<p>I validated my models with the usual Stratified Cross-Validation (5 folds).</p>\n<h3>Modeling</h3>\n<p>My choice, as always, was the CatBoost, I am choosing it, because it is easy to train it in GPU and with quite strong regulization, it can beet the XGBoost and LightGBM models.  I stopped with the small number of iterations (1000), max depth (5), and learning rate (1e-3), yet again, to prevent overfitting, because the dataset is too small. Also, I added the <code>scale_pos_weight</code> parameter, which applies the weights of classes for objective function/cost functions/loss, so the formula is just the frequencies of classes (count samples of certain class/all samples). In the binary classification task, it is just needed the weight for the positive class. It gives me ``<br>\nSo here are my parameters for the model:</p>\n<pre><code>SEED  = 42\n\nclasses, counts = np.unique(train_targets, return_counts=True)\npos_weight = (counts[-1] / sum(counts))\n\nmodel_parameters = {\n    \"min_data_in_leaf\": 250,\n    \"learning_rate\": 1e-3,\n    \"random_seed\": SEED,\n    \"max_depth\": 5,\n    \"verbose\": 100,\n    \"iterations\": 1000,\n    \"eval_metric\": \"AUC\",\n    \"early_stopping_rounds\": 250,\n    \"scale_pos_weight\": pos_weight,\n}\n</code></pre>\n<p>That's all! Thank you for reading! </p>",
      "rawMarkdown": "Thank you all, who shared discussions and notebooks, it was really interesting to read them, I learned a lot. Also, thank you to the organizers for this important competition for the world! Unfortunately, I was able to participate for 1-2 days, because of others competitions. \n\n\nGenerally, when I just saw the dataset, I understood that the dataset is too small to build deep models, because of the chance of overfitting. So, my main care was for Feature Engineering and Regulization. \n\n\n<h3>Feature Engineering</h3>\n- `continent`: all we know, is that sometimes autism disease oftener appears in some regions, like Africa, North America, North russia (not a mistake), etc, so it is important to include this factor. CV +0.002.\n<img src=\"https://i.ibb.co/ym9qyjn/1537972914587.webp\" alt=\"1537972914587\" border=\"0\">\n- `alpha frequency`: the count of `An_score` being the `1`. (count 1) / 10. CV +0.001.\n- `age binning`: binning of the `age` to 25 bins. CV + ~0.003.\n\n\n<h3>Pre-processing</h3>\nI just do the Target Encoding with quite strong regulization (smoothing 0.2) to prevent overfitting. CV +0.001\n\n<h3>Cross Validation</h3>\nI validated my models with the usual Stratified Cross-Validation (5 folds).\n\n\n<h3>Modeling</h3>\nMy choice, as always, was the CatBoost, I am choosing it, because it is easy to train it in GPU and with quite strong regulization, it can beet the XGBoost and LightGBM models.  I stopped with the small number of iterations (1000), max depth (5), and learning rate (1e-3), yet again, to prevent overfitting, because the dataset is too small. Also, I added the `scale_pos_weight` parameter, which applies the weights of classes for objective function/cost functions/loss, so the formula is just the frequencies of classes (count samples of certain class/all samples). In the binary classification task, it is just needed the weight for the positive class. It gives me ``\nSo here are my parameters for the model:\n\n```\nSEED  = 42\n\nclasses, counts = np.unique(train_targets, return_counts=True)\npos_weight = (counts[-1] / sum(counts))\n\nmodel_parameters = {\n    \"min_data_in_leaf\": 250,\n    \"learning_rate\": 1e-3,\n    \"random_seed\": SEED,\n    \"max_depth\": 5,\n    \"verbose\": 100,\n    \"iterations\": 1000,\n    \"eval_metric\": \"AUC\",\n    \"early_stopping_rounds\": 250,\n    \"scale_pos_weight\": pos_weight,\n}\n```\n\n\nThat's all! Thank you for reading! ",
      "votes": 19
    },
    {
      "id": 1717940,
      "postDate": "2022-03-10T11:18:33.787Z",
      "content": "<p><a href=\"https://www.kaggle.com/vad13irt\" target=\"_blank\">@vad13irt</a> ,</p>\n<p>Thank you for sharing your solution approach! <br>\nHowever, I would be more careful with some of the wording you have used to describe some of the continents. <code>Cheap region</code> is a little condescending. </p>\n<blockquote>\n  <p>all we know, is that sometimes autism disease often appears in the cheap region, like Africa, North America…</p>\n</blockquote>\n<p>Underdeveloped, developing regions, 3rd world countries etc. would be more appropriate in my opinion. </p>\n<p>Thanks for the solution again!</p>",
      "rawMarkdown": "@vad13irt ,\n\nThank you for sharing your solution approach! \nHowever, I would be more careful with some of the wording you have used to describe some of the continents. `Cheap region` is a little condescending. \n\n> all we know, is that sometimes autism disease often appears in the cheap region, like Africa, North America...\n\nUnderdeveloped, developing regions, 3rd world countries etc. would be more appropriate in my opinion. \n\nThanks for the solution again!",
      "votes": 3,
      "replies": [
        {
          "id": 1717943,
          "postDate": "2022-03-10T11:21:31.890Z",
          "content": "<p>Thank you for your comment. I understand what are you talking about, I hope, my words don't offend anyone, because I meant something else, you know.</p>",
          "rawMarkdown": "Thank you for your comment. I understand what are you talking about, I hope, my words don't offend anyone, because I meant something else, you know.",
          "votes": 1
        },
        {
          "id": 1717945,
          "postDate": "2022-03-10T11:22:35.667Z",
          "content": "<p>I updated. Thank you, <a href=\"https://www.kaggle.com/desalegngeb\" target=\"_blank\">@desalegngeb</a>! </p>",
          "rawMarkdown": "I updated. Thank you, @desalegngeb! ",
          "votes": 2
        },
        {
          "id": 1717949,
          "postDate": "2022-03-10T11:26:02.180Z",
          "content": "<p>Thank you and stay safe!</p>",
          "rawMarkdown": "Thank you and stay safe!",
          "votes": 2
        }
      ]
    },
    {
      "id": 1719857,
      "postDate": "2022-03-12T07:57:11.103Z",
      "content": "<p>This is great</p>",
      "rawMarkdown": "This is great",
      "votes": 1
    },
    {
      "id": 1718296,
      "postDate": "2022-03-10T17:47:38.337Z",
      "content": "<p>CV + 0.002 how you come up with factor eg - 0.002? </p>",
      "rawMarkdown": "CV + 0.002 how you come up with factor eg - 0.002? ",
      "votes": 1,
      "replies": [
        {
          "id": 1718310,
          "postDate": "2022-03-10T18:00:44.800Z",
          "content": "<p>I wrote down how much each change gave me. </p>",
          "rawMarkdown": "I wrote down how much each change gave me. ",
          "votes": 1
        },
        {
          "id": 1718545,
          "postDate": "2022-03-11T00:13:39.090Z",
          "content": "<p>Thats great👍</p>",
          "rawMarkdown": "Thats great👍",
          "votes": 1
        }
      ]
    },
    {
      "id": 1718133,
      "postDate": "2022-03-10T14:32:08.377Z",
      "content": "<p>Thank you so much for the summary <a href=\"https://www.kaggle.com/vad13irt\" target=\"_blank\">@vad13irt</a>. I have also used a similar sort of feature engineering approach. As you have mentioned feature engineering was the key to this competition.</p>\n<p>My baseline scikit-learn's Logistic regression model with default parameters &amp; same feature engineering as my best solution would still have been the 8th place solution (Private LB: 0.98051). But I have not &amp; would have never selected it for submission 😄.</p>",
      "rawMarkdown": "Thank you so much for the summary @vad13irt. I have also used a similar sort of feature engineering approach. As you have mentioned feature engineering was the key to this competition.\n\nMy baseline scikit-learn's Logistic regression model with default parameters & same feature engineering as my best solution would still have been the 8th place solution (Private LB: 0.98051). But I have not & would have never selected it for submission 😄.",
      "votes": 2
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-20T08:19:06Z",
  "competition_id": 34093,
  "competition_slug": "autism-prediction",
  "team_id": 8094424,
  "solution_url": "/competitions/autism-prediction/writeups/vad13irt-18th-place-solution"
}