{
  "id": 312152,
  "title": "[8th Place] Solution Summary",
  "content": "<p>First of all, <strong>Thank you so much <a href=\"https://www.kaggle.com/usharengaraju\" target=\"_blank\">@usharengaraju</a></strong> for hosting this amazing competition &amp; to all the fellow Kagglers for sharing their knowledge via notebooks &amp; discussions. I was able to learn a lot from them. I have participated in a few competitions, but this is the first time I have placed so high on the leaderboard. Also, this is my first post so <strong>Kindly upvote the post if you find it helpful.</strong></p>\n<h2>1. Exploratory Data Analysis &amp; Feature Engineering:</h2>\n<ol>\n<li><p>I have started off with exploratory data analysis, where I found out that the data does not have null values.</p></li>\n<li><p>The <code>contry_of_res</code> variable had 61 countries and some countries only had a few data records, so I created a new feature <code>continent</code> which maps the respective countries to their continents and dropped the <code>contry_of_res</code> variable.</p></li>\n<li><p>Variable <code>age_desc</code> had only one category, so I removed that variable.</p></li>\n<li><p>Variables <code>relation</code> and <code>ethnicity</code> had a category <code>?</code>. I have renamed that category as <code>unknown</code>.</p></li>\n<li><p>Variables <code>relation</code> and <code>ethnicity</code> also had some categories with fewer data records, so I have binned them into the <code>Others</code> category.</p></li>\n</ol>\n<h2>2. Model Building</h2>\n<h3>Strategy:</h3>\n<p>I have trained all the models using 10 fold stratified cross-validation. Normalized the numerical variables using StandardScaler, ordinal encoded the categorical variables using OrdinalEncoder</p>\n<h3>Models:</h3>\n<ul>\n<li><p>Baseline model - Scikit-learn's Logistic Regression model with default parameters. <strong>Public LB: 0.82655, Private LB: 0.98051</strong>. This model would still have been the 8th place solution.</p></li>\n<li><p>XGBoost model with hyperparameter tuned using Optuna. I have used <code>scale_pos_weight</code> as the data was imbalanced. <strong>Public LB: 0.93939, Private LB: 0.98268</strong>. This was my best submitted solution.</p></li>\n</ul>\n<pre><code>counter = Counter(Y_train)\nscale_pos_weight = counter.(0) / counter.(1)\n\nXGB_Params = {\n    : 201, : 15,\n    : 0.0038, : 0.7742,\n    : 6.654, : 0.3,\n    : 0.5, : 7\n}\n\nmodel = XGBClassifier(\n    =,\n    =scale_pos_weight,\n    =,\n    =,\n    =,\n    =,\n    =42,\n    =-1,\n    **XGB_Params\n)\n</code></pre>\n<ul>\n<li>LightGBM model with hyperparameter tuned using Optuna. I have used <code>is_unbalance</code> as the data was imbalanced. <strong>Public LB: 0.92477, Private LB: 0.96103</strong>. </li>\n</ul>\n<pre><code>LGBM_Params = {\n    : 381, : 0.0451, : 2680,\n    : 7, : 200, : 5,\n    : 40, : 0.5696,\n    : 0.8, : 1, : 0.25\n}\n\nmodel = LGBMClassifier(\n    =,\n    =,\n    =,\n    =42,\n    =-1,\n    **LGBM_Params\n)\n</code></pre>\n<ul>\n<li>Random Forest model with hyperparameter tuned using Optuna. I have used <code>class_weight</code> as the data was imbalanced. <strong>Public LB: 0.93791, Private LB: 0.98268</strong>. This score was exactly same as my best submitted XGBoost model.</li>\n</ul>\n<pre><code>counter = Counter(Y_train)\n\nparam_grid = {\n    : 958, : ,\n    : 3\n}\n\nclass_weight = {\n    0: n_samples / (counter.(0) * len(counter)),\n    1: n_samples / (counter.(1) * len(counter))\n}\n\nmodel = RandomForestClassifier(\n    =class_weight,\n    =0,\n    =-1,\n    **param_grid\n)\n</code></pre>\n<ul>\n<li>Finally the CatBoost model with hyperparameter tuned using Optuna. I have used <code>is_unbalance</code> as the data was imbalanced. <strong>Public LB: 0.93748 Private LB: 0.97835</strong>. </li>\n</ul>\n<pre><code>counter = Counter(Y_train)\nscale_pos_weight = counter.(0) / counter.(1)\n\nCatBoost_Params = {\n    : 186, : 0.00032,\n    : 0.0801, : 1,\n    : , : 4.3617\n}\n\nmodel = CatBoostClassifier(\n    *tBoost_Params,\n    =scale_pos_weight,\n    =,\n    =,\n    =42,\n    =0\n)\n</code></pre>\n<p>Hope this was helpful.</p>",
  "comments": [
    {
      "id": 1718317,
      "author_name": "dineshrajan",
      "author_url": "",
      "post_date": "2022-03-10T18:08:14.577000",
      "content": "<p>Good job !</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1718341,
          "author_name": "Kishore S",
          "author_url": "",
          "post_date": "2022-03-10T18:30:49.860000",
          "content": "<p>Thank you <a href=\"https://www.kaggle.com/dineshrajan\" target=\"_blank\">@dineshrajan</a>.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2012905,
      "author_name": "Kishore S",
      "author_url": "",
      "post_date": "2022-11-01T14:15:43.543000",
      "content": "<p>Link to my solution notebooks: <a href=\"https://www.kaggle.com/competitions/autism-prediction/discussion/312178\" target=\"_blank\">https://www.kaggle.com/competitions/autism-prediction/discussion/312178</a></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1718338,
      "author_name": "Kishore S",
      "author_url": "",
      "post_date": "2022-03-10T18:29:27.687000",
      "content": "<p>I have made my 8th place solution and other high-scoring notebooks public. You can find them in the competition codes section.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "comment_count": 4,
  "messages": [
    {
      "id": 1718236,
      "postDate": "2022-03-10T16:23:46.843Z",
      "content": "<p>First of all, <strong>Thank you so much <a href=\"https://www.kaggle.com/usharengaraju\" target=\"_blank\">@usharengaraju</a></strong> for hosting this amazing competition &amp; to all the fellow Kagglers for sharing their knowledge via notebooks &amp; discussions. I was able to learn a lot from them. I have participated in a few competitions, but this is the first time I have placed so high on the leaderboard. Also, this is my first post so <strong>Kindly upvote the post if you find it helpful.</strong></p>\n<h2>1. Exploratory Data Analysis &amp; Feature Engineering:</h2>\n<ol>\n<li><p>I have started off with exploratory data analysis, where I found out that the data does not have null values.</p></li>\n<li><p>The <code>contry_of_res</code> variable had 61 countries and some countries only had a few data records, so I created a new feature <code>continent</code> which maps the respective countries to their continents and dropped the <code>contry_of_res</code> variable.</p></li>\n<li><p>Variable <code>age_desc</code> had only one category, so I removed that variable.</p></li>\n<li><p>Variables <code>relation</code> and <code>ethnicity</code> had a category <code>?</code>. I have renamed that category as <code>unknown</code>.</p></li>\n<li><p>Variables <code>relation</code> and <code>ethnicity</code> also had some categories with fewer data records, so I have binned them into the <code>Others</code> category.</p></li>\n</ol>\n<h2>2. Model Building</h2>\n<h3>Strategy:</h3>\n<p>I have trained all the models using 10 fold stratified cross-validation. Normalized the numerical variables using StandardScaler, ordinal encoded the categorical variables using OrdinalEncoder</p>\n<h3>Models:</h3>\n<ul>\n<li><p>Baseline model - Scikit-learn's Logistic Regression model with default parameters. <strong>Public LB: 0.82655, Private LB: 0.98051</strong>. This model would still have been the 8th place solution.</p></li>\n<li><p>XGBoost model with hyperparameter tuned using Optuna. I have used <code>scale_pos_weight</code> as the data was imbalanced. <strong>Public LB: 0.93939, Private LB: 0.98268</strong>. This was my best submitted solution.</p></li>\n</ul>\n<pre><code>counter = Counter(Y_train)\nscale_pos_weight = counter.(0) / counter.(1)\n\nXGB_Params = {\n    : 201, : 15,\n    : 0.0038, : 0.7742,\n    : 6.654, : 0.3,\n    : 0.5, : 7\n}\n\nmodel = XGBClassifier(\n    =,\n    =scale_pos_weight,\n    =,\n    =,\n    =,\n    =,\n    =42,\n    =-1,\n    **XGB_Params\n)\n</code></pre>\n<ul>\n<li>LightGBM model with hyperparameter tuned using Optuna. I have used <code>is_unbalance</code> as the data was imbalanced. <strong>Public LB: 0.92477, Private LB: 0.96103</strong>. </li>\n</ul>\n<pre><code>LGBM_Params = {\n    : 381, : 0.0451, : 2680,\n    : 7, : 200, : 5,\n    : 40, : 0.5696,\n    : 0.8, : 1, : 0.25\n}\n\nmodel = LGBMClassifier(\n    =,\n    =,\n    =,\n    =42,\n    =-1,\n    **LGBM_Params\n)\n</code></pre>\n<ul>\n<li>Random Forest model with hyperparameter tuned using Optuna. I have used <code>class_weight</code> as the data was imbalanced. <strong>Public LB: 0.93791, Private LB: 0.98268</strong>. This score was exactly same as my best submitted XGBoost model.</li>\n</ul>\n<pre><code>counter = Counter(Y_train)\n\nparam_grid = {\n    : 958, : ,\n    : 3\n}\n\nclass_weight = {\n    0: n_samples / (counter.(0) * len(counter)),\n    1: n_samples / (counter.(1) * len(counter))\n}\n\nmodel = RandomForestClassifier(\n    =class_weight,\n    =0,\n    =-1,\n    **param_grid\n)\n</code></pre>\n<ul>\n<li>Finally the CatBoost model with hyperparameter tuned using Optuna. I have used <code>is_unbalance</code> as the data was imbalanced. <strong>Public LB: 0.93748 Private LB: 0.97835</strong>. </li>\n</ul>\n<pre><code>counter = Counter(Y_train)\nscale_pos_weight = counter.(0) / counter.(1)\n\nCatBoost_Params = {\n    : 186, : 0.00032,\n    : 0.0801, : 1,\n    : , : 4.3617\n}\n\nmodel = CatBoostClassifier(\n    *tBoost_Params,\n    =scale_pos_weight,\n    =,\n    =,\n    =42,\n    =0\n)\n</code></pre>\n<p>Hope this was helpful.</p>",
      "rawMarkdown": "First of all, **Thank you so much @usharengaraju** for hosting this amazing competition & to all the fellow Kagglers for sharing their knowledge via notebooks & discussions. I was able to learn a lot from them. I have participated in a few competitions, but this is the first time I have placed so high on the leaderboard. Also, this is my first post so **Kindly upvote the post if you find it helpful.**\n\n## 1. Exploratory Data Analysis & Feature Engineering:\n\n1. I have started off with exploratory data analysis, where I found out that the data does not have null values.\n\n2. The `contry_of_res` variable had 61 countries and some countries only had a few data records, so I created a new feature `continent` which maps the respective countries to their continents and dropped the `contry_of_res` variable.\n\n3. Variable `age_desc` had only one category, so I removed that variable.\n\n4. Variables `relation` and `ethnicity` had a category `?`. I have renamed that category as `unknown`.\n\n5. Variables `relation` and `ethnicity` also had some categories with fewer data records, so I have binned them into the `Others` category.\n\n## 2. Model Building\n\n### Strategy:\n\nI have trained all the models using 10 fold stratified cross-validation. Normalized the numerical variables using StandardScaler, ordinal encoded the categorical variables using OrdinalEncoder\n\n### Models:\n\n- Baseline model - Scikit-learn's Logistic Regression model with default parameters. **Public LB: 0.82655, Private LB: 0.98051**. This model would still have been the 8th place solution.\n\n- XGBoost model with hyperparameter tuned using Optuna. I have used `scale_pos_weight` as the data was imbalanced. **Public LB: 0.93939, Private LB: 0.98268**. This was my best submitted solution.\n\n```\ncounter = Counter(Y_train)\nscale_pos_weight = counter.get(0) / counter.get(1)\n\nXGB_Params = {\n    \"n_estimators\": 201, \"max_depth\": 15,\n    \"learning_rate\": 0.0038, \"reg_lambda\": 0.7742,\n    \"reg_alpha\": 6.654, \"colsample_bytree\": 0.3,\n    \"subsample\": 0.5, \"min_child_weight\": 7\n}\n\nmodel = XGBClassifier(\n    use_label_encoder=False,\n    scale_pos_weight=scale_pos_weight,\n    tree_method=\"gpu_hist\",\n    predictor=\"gpu_predictor\",\n    objective=\"binary:logistic\",\n    eval_metric=\"auc\",\n    random_state=42,\n    n_jobs=-1,\n    **XGB_Params\n)\n\n```\n\n- LightGBM model with hyperparameter tuned using Optuna. I have used `is_unbalance` as the data was imbalanced. **Public LB: 0.92477, Private LB: 0.96103**. \n\n```\nLGBM_Params = {\n    \"n_estimators\": 381, \"learning_rate\": 0.0451, \"num_leaves\": 2680,\n    \"max_depth\": 7, \"min_child_samples\": 200, \"reg_alpha\": 5,\n    \"reg_lambda\": 40, \"min_split_gain\": 0.5696,\n    \"subsample\": 0.8, \"subsample_freq\": 1, \"colsample_bytree\": 0.25\n}\n    \nmodel = LGBMClassifier(\n    objective=\"binary\",\n    device=\"gpu\",\n    is_unbalance=True,\n    random_state=42,\n    n_jobs=-1,\n    **LGBM_Params\n)\n```\n\n- Random Forest model with hyperparameter tuned using Optuna. I have used `class_weight` as the data was imbalanced. **Public LB: 0.93791, Private LB: 0.98268**. This score was exactly same as my best submitted XGBoost model.\n\n```\ncounter = Counter(Y_train)\n    \nparam_grid = {\n    \"n_estimators\": 958, \"criterion\": \"entropy\",\n    \"max_depth\": 3\n}\n\nclass_weight = {\n    0: n_samples / (counter.get(0) * len(counter)),\n    1: n_samples / (counter.get(1) * len(counter))\n}\n\nmodel = RandomForestClassifier(\n    class_weight=class_weight,\n    random_state=0,\n    n_jobs=-1,\n    **param_grid\n)\n```\n\n- Finally the CatBoost model with hyperparameter tuned using Optuna. I have used `is_unbalance` as the data was imbalanced. **Public LB: 0.93748 Private LB: 0.97835**. \n\n```\ncounter = Counter(Y_train)\nscale_pos_weight = counter.get(0) / counter.get(1)\n    \nCatBoost_Params = {\n    \"n_estimators\": 186, \"learning_rate\": 0.00032,\n    \"colsample_bylevel\": 0.0801, \"depth\": 1,\n    \"bootstrap_type\": \"Bayesian\", \"bagging_temperature\": 4.3617\n}\n    \nmodel = CatBoostClassifier(\n    **CatBoost_Params,\n    scale_pos_weight=scale_pos_weight,\n    objective=\"Logloss\",\n    eval_metric=\"AUC\",\n    random_state=42,\n    verbose=0\n)\n```\n\nHope this was helpful.",
      "votes": 6
    },
    {
      "id": 1718317,
      "postDate": "2022-03-10T18:08:14.577Z",
      "content": "<p>Good job !</p>",
      "rawMarkdown": "Good job !",
      "votes": 1,
      "replies": [
        {
          "id": 1718341,
          "postDate": "2022-03-10T18:30:49.860Z",
          "content": "<p>Thank you <a href=\"https://www.kaggle.com/dineshrajan\" target=\"_blank\">@dineshrajan</a>.</p>",
          "rawMarkdown": "Thank you @dineshrajan."
        }
      ]
    },
    {
      "id": 2012905,
      "postDate": "2022-11-01T14:15:43.543Z",
      "content": "<p>Link to my solution notebooks: <a href=\"https://www.kaggle.com/competitions/autism-prediction/discussion/312178\" target=\"_blank\">https://www.kaggle.com/competitions/autism-prediction/discussion/312178</a></p>",
      "rawMarkdown": "Link to my solution notebooks: https://www.kaggle.com/competitions/autism-prediction/discussion/312178"
    },
    {
      "id": 1718338,
      "postDate": "2022-03-10T18:29:27.687Z",
      "content": "<p>I have made my 8th place solution and other high-scoring notebooks public. You can find them in the competition codes section.</p>",
      "rawMarkdown": "I have made my 8th place solution and other high-scoring notebooks public. You can find them in the competition codes section."
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-20T08:19:18Z",
  "competition_id": 34093,
  "competition_slug": "autism-prediction",
  "team_id": 8156970,
  "solution_url": "/competitions/autism-prediction/writeups/kishore-s-8th-place-solution-summary"
}