{
  "id": 82085,
  "title": "How to get cv scores when doing stacking?",
  "url": "/competitions/elo-merchant-category-recommendation/discussion/82085",
  "author_name": "",
  "post_date": "2019-02-27T05:39:58.695515800Z",
  "votes": null,
  "comment_count": 6,
  "views": 0,
  "content": "<p>As is discussed by many people, we often use KFold to get cv scores, but how to get scores when doing stacking? and How to tuning parameters of the second/third level estimators?</p>",
  "messages": [
    {
      "id": "479406",
      "postDate": "02/27/2019 05:39:58",
      "content": "<p>As is discussed by many people, we often use KFold to get cv scores, but how to get scores when doing stacking? and How to tuning parameters of the second/third level estimators?</p>",
      "rawMarkdown": "As is discussed by many people, we often use KFold to get cv scores, but how to get scores when doing stacking? and How to tuning parameters of the second/third level estimators?",
      "votes": null
    },
    {
      "id": "479466",
      "postDate": "02/27/2019 06:57:05",
      "content": "<p>Uhm. You can do with kfold too !</p>",
      "rawMarkdown": "Uhm. You can do with kfold too !",
      "votes": null
    },
    {
      "id": "479693",
      "postDate": "02/27/2019 10:47:17",
      "content": "<p>Maybe these can help! :)</p>\n\n<p><a href=\"http://blog.kaggle.com/2016/12/27/a-kagglers-guide-to-model-stacking-in-practice/\">http://blog.kaggle.com/2016/12/27/a-kagglers-guide-to-model-stacking-in-practice/</a>\n<a href=\"https://www.kaggle.com/general/18793\">https://www.kaggle.com/general/18793</a></p>",
      "rawMarkdown": "Maybe these can help! :)\n\nhttp://blog.kaggle.com/2016/12/27/a-kagglers-guide-to-model-stacking-in-practice/\nhttps://www.kaggle.com/general/18793",
      "votes": null
    },
    {
      "id": "479751",
      "postDate": "02/27/2019 11:48:09",
      "content": "<p>Thank you, and maybe the seed of kfold for the second level should be different from the first level kfold seed?</p>",
      "rawMarkdown": "Thank you, and maybe the seed of kfold for the second level should be different from the first level kfold seed?",
      "votes": null
    },
    {
      "id": "479752",
      "postDate": "02/27/2019 11:48:26",
      "content": "<p>Thank you, and I'll read it carefully.</p>",
      "rawMarkdown": "Thank you, and I'll read it carefully.",
      "votes": null
    },
    {
      "id": "479888",
      "postDate": "02/27/2019 14:33:37",
      "content": "<p>the first and very first thing to do is to create the validation scheme and <strong>write the fold assignments into the raw data CSV.</strong> It makes stacking &amp; blending so much easier, since you can get the fold assignments right away from the dataframe at each stage of your pipeline.</p>\n\n<p>For stacking:</p>\n\n<p>You are training a model with your existing training set predictions as features, and the training target as target:</p>\n\n<p>Training Phase (try to keep the original K-fold validation scheme):</p>\n\n<ul>\n<li>Feature 1: Train Predictions of Model 1</li>\n<li>Feature 2: Train Predictions of Model 2</li>\n<li>Feature N: Train Predictions of Model N</li>\n<li>Target: the Train Target</li>\n</ul>\n\n<p>Submission Phase:</p>\n\n<ul>\n<li>Feature 1: Submission of Model 1</li>\n<li>Feature 2: Submission of Model 2</li>\n<li>Feature N: Submission of Model N</li>\n<li>Prediction: your stacking submission.</li>\n</ul>",
      "rawMarkdown": "the first and very first thing to do is to create the validation scheme and **write the fold assignments into the raw data CSV.** It makes stacking &amp; blending so much easier, since you can get the fold assignments right away from the dataframe at each stage of your pipeline.\n\n\n\nFor stacking:\n\nYou are training a model with your existing training set predictions as features, and the training target as target:\n\nTraining Phase (try to keep the original K-fold validation scheme):\n\n- Feature 1: Train Predictions of Model 1\n- Feature 2: Train Predictions of Model 2\n- Feature N: Train Predictions of Model N\n- Target: the Train Target\n\nSubmission Phase:\n\n- Feature 1: Submission of Model 1\n- Feature 2: Submission of Model 2\n- Feature N: Submission of Model N\n- Prediction: your stacking submission.",
      "votes": null
    },
    {
      "id": "480377",
      "postDate": "02/28/2019 05:34:19",
      "content": "<p>Thank you for your detailed and professional answers. Your answer has helped me a lot and solved my doubts. </p>",
      "rawMarkdown": "Thank you for your detailed and professional answers. Your answer has helped me a lot and solved my doubts.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 479466,
      "author_name": "sc0d3r",
      "author_url": "",
      "post_date": "02/27/2019 06:57:05",
      "content": "<p>Uhm. You can do with kfold too !</p>",
      "votes": null,
      "replies": [
        {
          "id": 479751,
          "author_name": "liewmanchoi",
          "author_url": "",
          "post_date": "02/27/2019 11:48:09",
          "content": "<p>Thank you, and maybe the seed of kfold for the second level should be different from the first level kfold seed?</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 479693,
      "author_name": "iamstark",
      "author_url": "",
      "post_date": "02/27/2019 10:47:17",
      "content": "<p>Maybe these can help! :)</p>\n\n<p><a href=\"http://blog.kaggle.com/2016/12/27/a-kagglers-guide-to-model-stacking-in-practice/\">http://blog.kaggle.com/2016/12/27/a-kagglers-guide-to-model-stacking-in-practice/</a>\n<a href=\"https://www.kaggle.com/general/18793\">https://www.kaggle.com/general/18793</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 479752,
          "author_name": "liewmanchoi",
          "author_url": "",
          "post_date": "02/27/2019 11:48:26",
          "content": "<p>Thank you, and I'll read it carefully.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 479888,
      "author_name": "kingychiu",
      "author_url": "",
      "post_date": "02/27/2019 14:33:37",
      "content": "<p>the first and very first thing to do is to create the validation scheme and <strong>write the fold assignments into the raw data CSV.</strong> It makes stacking &amp; blending so much easier, since you can get the fold assignments right away from the dataframe at each stage of your pipeline.</p>\n\n<p>For stacking:</p>\n\n<p>You are training a model with your existing training set predictions as features, and the training target as target:</p>\n\n<p>Training Phase (try to keep the original K-fold validation scheme):</p>\n\n<ul>\n<li>Feature 1: Train Predictions of Model 1</li>\n<li>Feature 2: Train Predictions of Model 2</li>\n<li>Feature N: Train Predictions of Model N</li>\n<li>Target: the Train Target</li>\n</ul>\n\n<p>Submission Phase:</p>\n\n<ul>\n<li>Feature 1: Submission of Model 1</li>\n<li>Feature 2: Submission of Model 2</li>\n<li>Feature N: Submission of Model N</li>\n<li>Prediction: your stacking submission.</li>\n</ul>",
      "votes": null,
      "replies": [
        {
          "id": 480377,
          "author_name": "liewmanchoi",
          "author_url": "",
          "post_date": "02/28/2019 05:34:19",
          "content": "<p>Thank you for your detailed and professional answers. Your answer has helped me a lot and solved my doubts. </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "479406": "As is discussed by many people, we often use KFold to get cv scores, but how to get scores when doing stacking? and How to tuning parameters of the second/third level estimators?",
    "479466": "Uhm. You can do with kfold too !",
    "479693": "Maybe these can help! :)\n\nhttp://blog.kaggle.com/2016/12/27/a-kagglers-guide-to-model-stacking-in-practice/\nhttps://www.kaggle.com/general/18793",
    "479751": "Thank you, and maybe the seed of kfold for the second level should be different from the first level kfold seed?",
    "479752": "Thank you, and I'll read it carefully.",
    "479888": "the first and very first thing to do is to create the validation scheme and **write the fold assignments into the raw data CSV.** It makes stacking &amp; blending so much easier, since you can get the fold assignments right away from the dataframe at each stage of your pipeline.\n\n\n\nFor stacking:\n\nYou are training a model with your existing training set predictions as features, and the training target as target:\n\nTraining Phase (try to keep the original K-fold validation scheme):\n\n- Feature 1: Train Predictions of Model 1\n- Feature 2: Train Predictions of Model 2\n- Feature N: Train Predictions of Model N\n- Target: the Train Target\n\nSubmission Phase:\n\n- Feature 1: Submission of Model 1\n- Feature 2: Submission of Model 2\n- Feature N: Submission of Model N\n- Prediction: your stacking submission.",
    "480377": "Thank you for your detailed and professional answers. Your answer has helped me a lot and solved my doubts."
  },
  "source": "meta"
}