{
  "id": 575606,
  "title": "#4 Great ensemble",
  "content": "<p>My final submission is an ensemble of seven models:</p>\n<ul>\n<li>Linear regression with polynomial features of degree 4</li>\n<li>Ridge regression with a Nystroem kernel approximation</li>\n<li>KernelRidge with a polynomial kernel of degree 5</li>\n<li>KernelRidge with a kernel composed of a polynomial kernel and an RBF kernel</li>\n<li>Ridge regression with feature engineering based on permutation probabilities</li>\n<li>CatBoost with feature engineering based on card counting and bust probabilities</li>\n<li>LightGBM with feature engineering based on card counting and bust probabilities</li>\n</ul>\n<p>Feature engineering for the tree models was inspired by the Wikipedia article on <a href=\"https://en.wikipedia.org/wiki/Card_counting\" target=\"_blank\">card counting</a>.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7917824%2Fe24ffac54f3afb707f6b5274dadd8801%2Fcomparison.png?generation=1745956899373239&amp;alt=media\" alt=\"model comparison\"></p>\n<p>I thank <a href=\"https://www.kaggle.com/andreipaulavets\" target=\"_blank\">@andreipaulavets</a> for organizing the competition, <a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a> for drawing my attention to it, and <a href=\"https://www.kaggle.com/masayakawamata\" target=\"_blank\">@masayakawamata</a> for his discussion contributions.</p>\n<p><a href=\"https://www.kaggle.com/code/ambrosm/blackjack-great-ensemble\" target=\"_blank\">Source code is here</a>.</p>",
  "comments": [
    {
      "id": 3191013,
      "author_name": "Alif Sathar",
      "author_url": "",
      "post_date": "2025-05-01T09:03:30.267000",
      "content": "<p>This is an excellent ensemble strategy — really impressive how you balanced traditional regressors with tree-based models like CatBoost and LightGBM. The feature engineering inspired by card counting was a clever touch, especially considering the domain. The CV score improvements with the ensemble are clear, and the model comparison plots are super informative! Curious: did you consider stacking or blending the outputs more formally, or was it a simple average ensemble?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 3191021,
          "author_name": "AmbrosM",
          "author_url": "",
          "post_date": "2025-05-01T09:28:47.500000",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/alifsathar\" target=\"_blank\">@alifsathar</a>, I stacked the models with <code>BayesianRidge</code> as you can verify in the <a href=\"https://www.kaggle.com/code/ambrosm/blackjack-great-ensemble\" target=\"_blank\">source code</a>.</p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 3190534,
      "author_name": "Prashant Kumar",
      "author_url": "",
      "post_date": "2025-04-30T19:25:22.337000",
      "content": "<p>Awesome ensemble! Love the mix of models and the clever card-counting features. Super insightful work.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 3189855,
      "author_name": "Andrei Paulavets",
      "author_url": "",
      "post_date": "2025-04-29T21:28:17.193000",
      "content": "<p>Great comparison, well done!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 3189815,
      "author_name": "Ravi Ramakrishnan",
      "author_url": "",
      "post_date": "2025-04-29T20:10:03.253000",
      "content": "<p>Congrats for the 4th place finish! I am glad to play a small part of this success <a href=\"https://www.kaggle.com/ambrosm\" target=\"_blank\">@ambrosm</a>!</p>",
      "votes": 2,
      "replies": []
    }
  ],
  "comment_count": 5,
  "messages": [
    {
      "id": 3189813,
      "postDate": "2025-04-29T20:02:49.327Z",
      "content": "<p>My final submission is an ensemble of seven models:</p>\n<ul>\n<li>Linear regression with polynomial features of degree 4</li>\n<li>Ridge regression with a Nystroem kernel approximation</li>\n<li>KernelRidge with a polynomial kernel of degree 5</li>\n<li>KernelRidge with a kernel composed of a polynomial kernel and an RBF kernel</li>\n<li>Ridge regression with feature engineering based on permutation probabilities</li>\n<li>CatBoost with feature engineering based on card counting and bust probabilities</li>\n<li>LightGBM with feature engineering based on card counting and bust probabilities</li>\n</ul>\n<p>Feature engineering for the tree models was inspired by the Wikipedia article on <a href=\"https://en.wikipedia.org/wiki/Card_counting\" target=\"_blank\">card counting</a>.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7917824%2Fe24ffac54f3afb707f6b5274dadd8801%2Fcomparison.png?generation=1745956899373239&amp;alt=media\" alt=\"model comparison\"></p>\n<p>I thank <a href=\"https://www.kaggle.com/andreipaulavets\" target=\"_blank\">@andreipaulavets</a> for organizing the competition, <a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a> for drawing my attention to it, and <a href=\"https://www.kaggle.com/masayakawamata\" target=\"_blank\">@masayakawamata</a> for his discussion contributions.</p>\n<p><a href=\"https://www.kaggle.com/code/ambrosm/blackjack-great-ensemble\" target=\"_blank\">Source code is here</a>.</p>",
      "rawMarkdown": "My final submission is an ensemble of seven models:\n- Linear regression with polynomial features of degree 4\n- Ridge regression with a Nystroem kernel approximation\n- KernelRidge with a polynomial kernel of degree 5\n- KernelRidge with a kernel composed of a polynomial kernel and an RBF kernel\n- Ridge regression with feature engineering based on permutation probabilities\n- CatBoost with feature engineering based on card counting and bust probabilities\n- LightGBM with feature engineering based on card counting and bust probabilities\n\nFeature engineering for the tree models was inspired by the Wikipedia article on [card counting](https://en.wikipedia.org/wiki/Card_counting).\n\n![model comparison](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7917824%2Fe24ffac54f3afb707f6b5274dadd8801%2Fcomparison.png?generation=1745956899373239&alt=media)\n\nI thank @andreipaulavets for organizing the competition, @ravi20076 for drawing my attention to it, and @masayakawamata for his discussion contributions.\n\n[Source code is here](https://www.kaggle.com/code/ambrosm/blackjack-great-ensemble).",
      "votes": 9
    },
    {
      "id": 3191013,
      "postDate": "2025-05-01T09:03:30.267Z",
      "content": "<p>This is an excellent ensemble strategy — really impressive how you balanced traditional regressors with tree-based models like CatBoost and LightGBM. The feature engineering inspired by card counting was a clever touch, especially considering the domain. The CV score improvements with the ensemble are clear, and the model comparison plots are super informative! Curious: did you consider stacking or blending the outputs more formally, or was it a simple average ensemble?</p>",
      "rawMarkdown": "This is an excellent ensemble strategy — really impressive how you balanced traditional regressors with tree-based models like CatBoost and LightGBM. The feature engineering inspired by card counting was a clever touch, especially considering the domain. The CV score improvements with the ensemble are clear, and the model comparison plots are super informative! Curious: did you consider stacking or blending the outputs more formally, or was it a simple average ensemble?",
      "votes": 1,
      "replies": [
        {
          "id": 3191021,
          "postDate": "2025-05-01T09:28:47.500Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/alifsathar\" target=\"_blank\">@alifsathar</a>, I stacked the models with <code>BayesianRidge</code> as you can verify in the <a href=\"https://www.kaggle.com/code/ambrosm/blackjack-great-ensemble\" target=\"_blank\">source code</a>.</p>",
          "rawMarkdown": "Hi @alifsathar, I stacked the models with `BayesianRidge` as you can verify in the [source code](https://www.kaggle.com/code/ambrosm/blackjack-great-ensemble).",
          "votes": 2
        }
      ]
    },
    {
      "id": 3190534,
      "postDate": "2025-04-30T19:25:22.337Z",
      "content": "<p>Awesome ensemble! Love the mix of models and the clever card-counting features. Super insightful work.</p>",
      "rawMarkdown": "Awesome ensemble! Love the mix of models and the clever card-counting features. Super insightful work.",
      "votes": 1
    },
    {
      "id": 3189855,
      "postDate": "2025-04-29T21:28:17.193Z",
      "content": "<p>Great comparison, well done!</p>",
      "rawMarkdown": "Great comparison, well done!",
      "votes": 1
    },
    {
      "id": 3189815,
      "postDate": "2025-04-29T20:10:03.253Z",
      "content": "<p>Congrats for the 4th place finish! I am glad to play a small part of this success <a href=\"https://www.kaggle.com/ambrosm\" target=\"_blank\">@ambrosm</a>!</p>",
      "rawMarkdown": "Congrats for the 4th place finish! I am glad to play a small part of this success @ambrosm!",
      "votes": 2
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-20T02:32:56Z",
  "competition_id": 94020,
  "competition_slug": "black-jack-smart-effect-of-removal-ml",
  "team_id": 13460618,
  "solution_url": "/competitions/black-jack-smart-effect-of-removal-ml/writeups/ambrosm-4-great-ensemble"
}