{
  "id": 389054,
  "title": "How do we ensemble different machine learning method ?",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/389054",
  "author_name": "",
  "post_date": "2023-02-20T19:33:21.757784Z",
  "votes": 5,
  "comment_count": 2,
  "views": 0,
  "content": "<p>We only can call once the method .make_env and iterate once through iter_test iterator, we can't ensemble it like this <a href=\"https://www.kaggle.com/code/thedevastator/how-to-correctly-ensemble-public-notebooks?scriptVersionId=119702674&amp;cellId=14\" target=\"_blank\">sample code</a>.</p>",
  "messages": [
    {
      "id": "2152406",
      "postDate": "02/20/2023 19:33:21",
      "content": "<p>We only can call once the method .make_env and iterate once through iter_test iterator, we can't ensemble it like this <a href=\"https://www.kaggle.com/code/thedevastator/how-to-correctly-ensemble-public-notebooks?scriptVersionId=119702674&amp;cellId=14\" target=\"_blank\">sample code</a>.</p>",
      "rawMarkdown": "We only can call once the method .make_env and iterate once through iter_test iterator, we can't ensemble it like this [sample code](https://www.kaggle.com/code/thedevastator/how-to-correctly-ensemble-public-notebooks?scriptVersionId=119702674&cellId=14).",
      "votes": null
    },
    {
      "id": "2152504",
      "postDate": "02/20/2023 20:43:34",
      "content": "<p>We can ensemble inside the Kaggle API for-loop. For example </p>\n<pre><code>for (sample_submission, test) in iter_test:\n    DATA = feature_engineer(test)\n    PRED1 = MODEL1.predict_proba(DATA)\n    PRED2 = MODEL2.predict_proba(DATA)\n    PRED3 = MODEL3.predict_proba(DATA)\n    pred = int((PRED1 + PRED2 + PRED3)/3. &gt; THRESHOLD)\n</code></pre>",
      "rawMarkdown": "We can ensemble inside the Kaggle API for-loop. For example \n\n    for (sample_submission, test) in iter_test:\n        DATA = feature_engineer(test)\n        PRED1 = MODEL1.predict_proba(DATA)\n        PRED2 = MODEL2.predict_proba(DATA)\n        PRED3 = MODEL3.predict_proba(DATA)\n        pred = int((PRED1 + PRED2 + PRED3)/3. > THRESHOLD)",
      "votes": null
    },
    {
      "id": "2152549",
      "postDate": "02/20/2023 21:39:13",
      "content": "<p>Thank you for your kindly reply.<br>\nI will try that one.</p>",
      "rawMarkdown": "Thank you for your kindly reply.\nI will try that one.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2152504,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "02/20/2023 20:43:34",
      "content": "<p>We can ensemble inside the Kaggle API for-loop. For example </p>\n<pre><code>for (sample_submission, test) in iter_test:\n    DATA = feature_engineer(test)\n    PRED1 = MODEL1.predict_proba(DATA)\n    PRED2 = MODEL2.predict_proba(DATA)\n    PRED3 = MODEL3.predict_proba(DATA)\n    pred = int((PRED1 + PRED2 + PRED3)/3. &gt; THRESHOLD)\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 2152549,
          "author_name": "tomonorisasaki",
          "author_url": "",
          "post_date": "02/20/2023 21:39:13",
          "content": "<p>Thank you for your kindly reply.<br>\nI will try that one.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2152406": "We only can call once the method .make_env and iterate once through iter_test iterator, we can't ensemble it like this [sample code](https://www.kaggle.com/code/thedevastator/how-to-correctly-ensemble-public-notebooks?scriptVersionId=119702674&cellId=14).",
    "2152504": "We can ensemble inside the Kaggle API for-loop. For example \n\n    for (sample_submission, test) in iter_test:\n        DATA = feature_engineer(test)\n        PRED1 = MODEL1.predict_proba(DATA)\n        PRED2 = MODEL2.predict_proba(DATA)\n        PRED3 = MODEL3.predict_proba(DATA)\n        pred = int((PRED1 + PRED2 + PRED3)/3. > THRESHOLD)",
    "2152549": "Thank you for your kindly reply.\nI will try that one."
  },
  "source": "meta"
}