{
  "id": 57510,
  "title": "Running KFOLD with RNN - For Beginners ",
  "url": "/competitions/avito-demand-prediction/discussion/57510",
  "author_name": "Shanth",
  "post_date": "2018-05-24T17:43:23.484000",
  "votes": 19,
  "comment_count": 6,
  "views": 0,
  "content": "<p><strong>WHY AM  I POSTING THIS?</strong></p>\n\n<p>I faced a variety of array mismatch issues with the title_description columns while trying to make KFOLD work. While the logic of KFOLD is simple these issues held me up for a very long time. </p>\n\n<p>While the other variables where of shape (n,1), the title_description was of shape (n,100) where 100 was the max length of the sequences of the title and description texts.</p>\n\n<p>I guessed some beginners may face the same issue. So this kernel provides one approach to work around this issue to run the KFOLD. </p>\n\n<p>WORK FLOW FOR KFOLD **\nGenerate train data frame with transformations for features\nGet train.values as array as input for KFOLD split\nSplit train.values into train and test using sklearn KFOLD\nArrange each column of the train and test arrays into a data frame for X_train and X_test ( A function is used )\nConvert the data frame into a Dictionary with relevant columns as \"Keys\"\nUse these Train and Test dictionary as inputs to the RNN</p>\n\n<p>I made a simple working kernel with shows how KFOLD can be used. Hope this helps many beginners. </p>\n\n<p><a href=\"https://www.kaggle.com/shanth84/rnn-how-to-run-kfold-explanation-for-beginners/data\">KFOLD For RNN for Beginners - Link to Public Kernel</a></p>\n\n<p>Regards\nShanth </p>",
  "messages": [
    {
      "id": 333224,
      "postDate": "2018-05-24T17:43:23.483Z",
      "content": "<p><strong>WHY AM  I POSTING THIS?</strong></p>\n\n<p>I faced a variety of array mismatch issues with the title_description columns while trying to make KFOLD work. While the logic of KFOLD is simple these issues held me up for a very long time. </p>\n\n<p>While the other variables where of shape (n,1), the title_description was of shape (n,100) where 100 was the max length of the sequences of the title and description texts.</p>\n\n<p>I guessed some beginners may face the same issue. So this kernel provides one approach to work around this issue to run the KFOLD. </p>\n\n<p>WORK FLOW FOR KFOLD **\nGenerate train data frame with transformations for features\nGet train.values as array as input for KFOLD split\nSplit train.values into train and test using sklearn KFOLD\nArrange each column of the train and test arrays into a data frame for X_train and X_test ( A function is used )\nConvert the data frame into a Dictionary with relevant columns as \"Keys\"\nUse these Train and Test dictionary as inputs to the RNN</p>\n\n<p>I made a simple working kernel with shows how KFOLD can be used. Hope this helps many beginners. </p>\n\n<p><a href=\"https://www.kaggle.com/shanth84/rnn-how-to-run-kfold-explanation-for-beginners/data\">KFOLD For RNN for Beginners - Link to Public Kernel</a></p>\n\n<p>Regards\nShanth </p>",
      "rawMarkdown": "**WHY AM  I POSTING THIS?**\n\nI faced a variety of array mismatch issues with the title_description columns while trying to make KFOLD work. While the logic of KFOLD is simple these issues held me up for a very long time. \n\nWhile the other variables where of shape (n,1), the title_description was of shape (n,100) where 100 was the max length of the sequences of the title and description texts.\n\nI guessed some beginners may face the same issue. So this kernel provides one approach to work around this issue to run the KFOLD. \n\nWORK FLOW FOR KFOLD **\nGenerate train data frame with transformations for features\nGet train.values as array as input for KFOLD split\nSplit train.values into train and test using sklearn KFOLD\nArrange each column of the train and test arrays into a data frame for X_train and X_test ( A function is used )\nConvert the data frame into a Dictionary with relevant columns as \"Keys\"\nUse these Train and Test dictionary as inputs to the RNN\n\nI made a simple working kernel with shows how KFOLD can be used. Hope this helps many beginners. \n\n[KFOLD For RNN for Beginners - Link to Public Kernel][1]\n\nRegards\nShanth \n\n  [1]: https://www.kaggle.com/shanth84/rnn-how-to-run-kfold-explanation-for-beginners/data",
      "votes": 19
    },
    {
      "id": 333475,
      "postDate": "2018-05-25T08:20:59.487Z",
      "content": "<p>Thanks for sharing.</p>",
      "rawMarkdown": "Thanks for sharing.",
      "votes": 1,
      "replies": [
        {
          "id": 333486,
          "postDate": "2018-05-25T08:38:40.677Z",
          "content": "<p>Sure. Your' welcome.</p>",
          "rawMarkdown": "Sure. Your' welcome."
        }
      ]
    },
    {
      "id": 333296,
      "postDate": "2018-05-24T20:16:21.653Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true,
      "replies": [
        {
          "id": 333299,
          "postDate": "2018-05-24T20:22:19.800Z",
          "content": "<p>@ Zijun Yao</p>\n\n<p>Thanks for the kind words. I just realized I had been downvoted. But I am sure others will find it helpful. </p>\n\n<p>Cheers \nShanth</p>",
          "rawMarkdown": "@ Zijun Yao\n\nThanks for the kind words. I just realized I had been downvoted. But I am sure others will find it helpful. \n\nCheers \nShanth"
        },
        {
          "id": 333373,
          "postDate": "2018-05-25T03:39:45.780Z",
          "content": "<p>I also don't think you deserved a downvote. I've upvoted you. :) Thanks for your work. :)</p>",
          "rawMarkdown": "I also don't think you deserved a downvote. I've upvoted you. :) Thanks for your work. :)",
          "votes": 1
        },
        {
          "id": 333391,
          "postDate": "2018-05-25T04:40:38.697Z",
          "content": "<p>Thanks Peter :)</p>",
          "rawMarkdown": "Thanks Peter :)"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 333475,
      "author_name": "AkhilG",
      "author_url": "",
      "post_date": "2018-05-25T08:20:59.487000",
      "content": "<p>Thanks for sharing.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 333486,
          "author_name": "Shanth",
          "author_url": "",
          "post_date": "2018-05-25T08:38:40.677000",
          "content": "<p>Sure. Your' welcome.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 333296,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-05-24T20:16:21.653000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 333299,
          "author_name": "Shanth",
          "author_url": "",
          "post_date": "2018-05-24T20:22:19.800000",
          "content": "<p>@ Zijun Yao</p>\n\n<p>Thanks for the kind words. I just realized I had been downvoted. But I am sure others will find it helpful. </p>\n\n<p>Cheers \nShanth</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 333373,
          "author_name": "Peter Hurford",
          "author_url": "",
          "post_date": "2018-05-25T03:39:45.780000",
          "content": "<p>I also don't think you deserved a downvote. I've upvoted you. :) Thanks for your work. :)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 333391,
          "author_name": "Shanth",
          "author_url": "",
          "post_date": "2018-05-25T04:40:38.697000",
          "content": "<p>Thanks Peter :)</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "333224": "**WHY AM  I POSTING THIS?**\n\nI faced a variety of array mismatch issues with the title_description columns while trying to make KFOLD work. While the logic of KFOLD is simple these issues held me up for a very long time. \n\nWhile the other variables where of shape (n,1), the title_description was of shape (n,100) where 100 was the max length of the sequences of the title and description texts.\n\nI guessed some beginners may face the same issue. So this kernel provides one approach to work around this issue to run the KFOLD. \n\nWORK FLOW FOR KFOLD **\nGenerate train data frame with transformations for features\nGet train.values as array as input for KFOLD split\nSplit train.values into train and test using sklearn KFOLD\nArrange each column of the train and test arrays into a data frame for X_train and X_test ( A function is used )\nConvert the data frame into a Dictionary with relevant columns as \"Keys\"\nUse these Train and Test dictionary as inputs to the RNN\n\nI made a simple working kernel with shows how KFOLD can be used. Hope this helps many beginners. \n\n[KFOLD For RNN for Beginners - Link to Public Kernel][1]\n\nRegards\nShanth \n\n  [1]: https://www.kaggle.com/shanth84/rnn-how-to-run-kfold-explanation-for-beginners/data",
    "333475": "Thanks for sharing.",
    "333296": ""
  }
}