{
  "topic": {
    "id": 332848,
    "title": "Validation Strategy - Stratified Group Kfold",
    "authorName": "Deepak Bhat",
    "commentCount": 5,
    "votes": 18,
    "postDate": "2022-06-23T16:00:15.611000"
  },
  "comments": [
    {
      "id": 1830713,
      "authorName": "Vadim Irtlach",
      "votes": 1,
      "postDate": "2022-06-23T16:07:20.527000",
      "content": "<pre><code>Most of the public notebooks here seem to be using groupkfold on essay_id. I think a stronger validation strategy would be to ensure no essay_id overlap between folds while preserving the distribution of discourse_type &amp; discourse_effectiveness between folds.\n</code></pre>\n<p>GroupKFold implies no overlap in groups, i.e training on one group (training dataset), then prediction on other (validation dataset).</p>"
    },
    {
      "id": 1830736,
      "authorName": "Deepak Bhat",
      "votes": 1,
      "postDate": "2022-06-23T16:23:48.123000",
      "content": "<p>yes , I meant most of the notebooks just group on essay_id. I think stratifying it on discourse type and effectiveness after grouping on essay id would be a better choice. </p>"
    },
    {
      "id": 1844255,
      "authorName": "TouTie",
      "votes": 2,
      "postDate": "2022-07-05T12:44:30.057000",
      "content": "<blockquote>\n  <p>This can be done using sklearn's stratified group k fold where you group on essay_id and stratify on combination of discourse_type and discourse_effectiveness. </p>\n</blockquote>\n<p>Hello! You say one can group on essay_id, but you actually group on discourse_id in your attached code???</p>"
    },
    {
      "id": 1846079,
      "authorName": "Deepak Bhat",
      "votes": 0,
      "postDate": "2022-07-06T19:37:25.163000",
      "content": "<p><a href=\"https://www.kaggle.com/juweichan\" target=\"_blank\">@juweichan</a> Thanks for pointing it out. It was an oversight. I have changed the code and updated the datasets!</p>"
    },
    {
      "id": 1837902,
      "authorName": "",
      "votes": 0,
      "postDate": "2022-06-30T03:19:57.487000",
      "content": ""
    }
  ],
  "index": {
    "id": "332848",
    "title": "Validation Strategy - Stratified Group Kfold",
    "authorName": "Deepak Bhat",
    "commentCount": "5",
    "votes": "18",
    "postDate": "2022-06-23 16:00:15.611000"
  }
}