{
  "id": 75409,
  "title": "How to use weights of 5 fold cross validation models in keras ?",
  "url": "/competitions/quora-insincere-questions-classification/discussion/75409",
  "author_name": "",
  "post_date": "2018-12-21T10:00:52.477917300Z",
  "votes": null,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I have used 5 fold cross validation for my predictions with keras. Should I save all the 5 weights and average them for getting the final model weights?</p>",
  "messages": [
    {
      "id": "443259",
      "postDate": "12/21/2018 10:00:52",
      "content": "<p>I have used 5 fold cross validation for my predictions with keras. Should I save all the 5 weights and average them for getting the final model weights?</p>",
      "rawMarkdown": "I have used 5 fold cross validation for my predictions with keras. Should I save all the 5 weights and average them for getting the final model weights?",
      "votes": null
    },
    {
      "id": "443317",
      "postDate": "12/21/2018 12:14:41",
      "content": "<p>I use the five models to get predictions on the test set, and merge the predictions by taking the average. I think that's the standard thing to do, but correct me if I'm wrong.</p>",
      "rawMarkdown": "I use the five models to get predictions on the test set, and merge the predictions by taking the average. I think that's the standard thing to do, but correct me if I'm wrong.",
      "votes": null
    },
    {
      "id": "443321",
      "postDate": "12/21/2018 12:33:23",
      "content": "<p>Hi theo,\nThat's standard thing but what if I want a single model to use on future data. Should I use the average weights?</p>",
      "rawMarkdown": "Hi theo,\nThat's standard thing but what if I want a single model to use on future data. Should I use the average weights?",
      "votes": null
    },
    {
      "id": "443355",
      "postDate": "12/21/2018 13:34:39",
      "content": "<p>Honestly, you can try it but I doubt you'll get any results. \nIt can work if your weights all converge to the same local minimum, but otherwise I believe your model will be worst. \nSee <a href=\"https://imgur.com/a/KWzQLA2\">https://imgur.com/a/KWzQLA2</a></p>",
      "rawMarkdown": "Honestly, you can try it but I doubt you'll get any results. \nIt can work if your weights all converge to the same local minimum, but otherwise I believe your model will be worst. \nSee https://imgur.com/a/KWzQLA2",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 443317,
      "author_name": "theoviel",
      "author_url": "",
      "post_date": "12/21/2018 12:14:41",
      "content": "<p>I use the five models to get predictions on the test set, and merge the predictions by taking the average. I think that's the standard thing to do, but correct me if I'm wrong.</p>",
      "votes": null,
      "replies": [
        {
          "id": 443321,
          "author_name": "raghav3490",
          "author_url": "",
          "post_date": "12/21/2018 12:33:23",
          "content": "<p>Hi theo,\nThat's standard thing but what if I want a single model to use on future data. Should I use the average weights?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 443355,
          "author_name": "theoviel",
          "author_url": "",
          "post_date": "12/21/2018 13:34:39",
          "content": "<p>Honestly, you can try it but I doubt you'll get any results. \nIt can work if your weights all converge to the same local minimum, but otherwise I believe your model will be worst. \nSee <a href=\"https://imgur.com/a/KWzQLA2\">https://imgur.com/a/KWzQLA2</a></p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "443259": "I have used 5 fold cross validation for my predictions with keras. Should I save all the 5 weights and average them for getting the final model weights?",
    "443317": "I use the five models to get predictions on the test set, and merge the predictions by taking the average. I think that's the standard thing to do, but correct me if I'm wrong.",
    "443321": "Hi theo,\nThat's standard thing but what if I want a single model to use on future data. Should I use the average weights?",
    "443355": "Honestly, you can try it but I doubt you'll get any results. \nIt can work if your weights all converge to the same local minimum, but otherwise I believe your model will be worst. \nSee https://imgur.com/a/KWzQLA2"
  },
  "source": "meta"
}