{
  "id": 343373,
  "title": "Noob question about terminologies: oof and 1 fold prediction",
  "url": "/competitions/hubmap-organ-segmentation/discussion/343373",
  "author_name": "",
  "post_date": "2022-08-11T04:47:45.975567600Z",
  "votes": null,
  "comment_count": 4,
  "views": 0,
  "content": "<p>What is out of fold(oof) and 1 fold prediction? I know K-fold cross validation and leave-one-out cross validation. But the two terminologies a lot used in Kaggle are not something that I'm familiar with. Could you please help me understand the concepts of the terminologies by giving me source to read or explaining them? </p>",
  "messages": [
    {
      "id": "1893789",
      "postDate": "08/11/2022 04:47:45",
      "content": "<p>What is out of fold(oof) and 1 fold prediction? I know K-fold cross validation and leave-one-out cross validation. But the two terminologies a lot used in Kaggle are not something that I'm familiar with. Could you please help me understand the concepts of the terminologies by giving me source to read or explaining them? </p>",
      "rawMarkdown": "What is out of fold(oof) and 1 fold prediction? I know K-fold cross validation and leave-one-out cross validation. But the two terminologies a lot used in Kaggle are not something that I'm familiar with. Could you please help me understand the concepts of the terminologies by giving me source to read or explaining them?",
      "votes": null
    },
    {
      "id": "1894876",
      "postDate": "08/11/2022 18:57:10",
      "content": "<p>I'm not quite sure what you mean by 1 fold prediction but I'll have a go at explaining the out of fold prediction (though others may want to correct me if I'm mistaken). It's maybe best using an example to bring this to life:<br>\nImagine a dataset of 500 rows where you try to predict an individuals salary in $.<br>\nYou decide to apply 10 fold cross validation. This means every fold will contain 50 rows.<br>\nIn the first iteration you will train a model on 450 rows (9<em>50) and make predictions on the final fold of 50 rows (the hold out).\nYou will then move onto the next fold of 450 rows and a set of predictions on a different 50 rows.\nBy the end of the cross validation you have 10 lots of predictions for 50 rows. This is the same size as your starting dataset (50</em>10 = 500)<br>\n<strong>These 500 predicted rows are the out of fold predictions</strong> and could be compared to the known values for each row to calculate an error term. E.g. first row has a known salary of $15,000 but when this row formed part of the holdout it gave a prediction of $17,000 </p>\n<p><a href=\"https://stackoverflow.com/questions/52396191/what-is-oof-approach-in-machine-learning\" target=\"_blank\">This link</a> might help.</p>",
      "rawMarkdown": "I'm not quite sure what you mean by 1 fold prediction but I'll have a go at explaining the out of fold prediction (though others may want to correct me if I'm mistaken). It's maybe best using an example to bring this to life:\nImagine a dataset of 500 rows where you try to predict an individuals salary in $.\nYou decide to apply 10 fold cross validation. This means every fold will contain 50 rows.\nIn the first iteration you will train a model on 450 rows (9*50) and make predictions on the final fold of 50 rows (the hold out).\nYou will then move onto the next fold of 450 rows and a set of predictions on a different 50 rows.\nBy the end of the cross validation you have 10 lots of predictions for 50 rows. This is the same size as your starting dataset (50*10 = 500)\n**These 500 predicted rows are the out of fold predictions** and could be compared to the known values for each row to calculate an error term. E.g. first row has a known salary of $15,000 but when this row formed part of the holdout it gave a prediction of $17,000 \n\n[This link](https://stackoverflow.com/questions/52396191/what-is-oof-approach-in-machine-learning) might help.",
      "votes": null
    },
    {
      "id": "1895772",
      "postDate": "08/12/2022 11:30:58",
      "content": "<p>Hey)</p>\n<p><strong>OOF</strong> is a Out Of fold (predictions) <br>\n<a href=\"https://machinelearningmastery.com/out-of-fold-predictions-in-machine-learning/\" target=\"_blank\">Link</a> for more information</p>\n<p><strong>1</strong> <strong>fold</strong> is one of k-folder<br>\nIn K-Fold cross validation method, we divide the data in K folds. Then we use K-1 folds for training it and evaluate/test it on the 1 fold and then repeat it K times with unique fold for evaluating in each iteration.<br>\nNice <a href=\"https://www.kaggle.com/code/satishgunjal/tutorial-k-fold-cross-validation\" target=\"_blank\">tutorial</a> about it and <a href=\"https://www.analyticsvidhya.com/blog/2022/02/k-fold-cross-validation-technique-and-its-essentials/\" target=\"_blank\">link</a></p>\n<p><em>Good luck</em> :D</p>",
      "rawMarkdown": "Hey)\n\n**OOF** is a Out Of fold (predictions) \n[Link](https://machinelearningmastery.com/out-of-fold-predictions-in-machine-learning/) for more information\n\n**1** **fold** is one of k-folder\nIn K-Fold cross validation method, we divide the data in K folds. Then we use K-1 folds for training it and evaluate/test it on the 1 fold and then repeat it K times with unique fold for evaluating in each iteration.\nNice [tutorial](https://www.kaggle.com/code/satishgunjal/tutorial-k-fold-cross-validation) about it and [link](https://www.analyticsvidhya.com/blog/2022/02/k-fold-cross-validation-technique-and-its-essentials/)\n\n*Good luck* :D",
      "votes": null
    },
    {
      "id": "1943056",
      "postDate": "09/17/2022 08:53:26",
      "content": "<p>My apology for the late response. Thank you very much for your help!</p>",
      "rawMarkdown": "My apology for the late response. Thank you very much for your help!",
      "votes": null
    },
    {
      "id": "1943057",
      "postDate": "09/17/2022 08:53:52",
      "content": "<p>My apology for the late response. Thank you very much for the example and explanation! </p>",
      "rawMarkdown": "My apology for the late response. Thank you very much for the example and explanation!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1894876,
      "author_name": "davidmchealthactuary",
      "author_url": "",
      "post_date": "08/11/2022 18:57:10",
      "content": "<p>I'm not quite sure what you mean by 1 fold prediction but I'll have a go at explaining the out of fold prediction (though others may want to correct me if I'm mistaken). It's maybe best using an example to bring this to life:<br>\nImagine a dataset of 500 rows where you try to predict an individuals salary in $.<br>\nYou decide to apply 10 fold cross validation. This means every fold will contain 50 rows.<br>\nIn the first iteration you will train a model on 450 rows (9<em>50) and make predictions on the final fold of 50 rows (the hold out).\nYou will then move onto the next fold of 450 rows and a set of predictions on a different 50 rows.\nBy the end of the cross validation you have 10 lots of predictions for 50 rows. This is the same size as your starting dataset (50</em>10 = 500)<br>\n<strong>These 500 predicted rows are the out of fold predictions</strong> and could be compared to the known values for each row to calculate an error term. E.g. first row has a known salary of $15,000 but when this row formed part of the holdout it gave a prediction of $17,000 </p>\n<p><a href=\"https://stackoverflow.com/questions/52396191/what-is-oof-approach-in-machine-learning\" target=\"_blank\">This link</a> might help.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1943057,
          "author_name": "cheulkay",
          "author_url": "",
          "post_date": "09/17/2022 08:53:52",
          "content": "<p>My apology for the late response. Thank you very much for the example and explanation! </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1895772,
      "author_name": "anastasii1",
      "author_url": "",
      "post_date": "08/12/2022 11:30:58",
      "content": "<p>Hey)</p>\n<p><strong>OOF</strong> is a Out Of fold (predictions) <br>\n<a href=\"https://machinelearningmastery.com/out-of-fold-predictions-in-machine-learning/\" target=\"_blank\">Link</a> for more information</p>\n<p><strong>1</strong> <strong>fold</strong> is one of k-folder<br>\nIn K-Fold cross validation method, we divide the data in K folds. Then we use K-1 folds for training it and evaluate/test it on the 1 fold and then repeat it K times with unique fold for evaluating in each iteration.<br>\nNice <a href=\"https://www.kaggle.com/code/satishgunjal/tutorial-k-fold-cross-validation\" target=\"_blank\">tutorial</a> about it and <a href=\"https://www.analyticsvidhya.com/blog/2022/02/k-fold-cross-validation-technique-and-its-essentials/\" target=\"_blank\">link</a></p>\n<p><em>Good luck</em> :D</p>",
      "votes": null,
      "replies": [
        {
          "id": 1943056,
          "author_name": "cheulkay",
          "author_url": "",
          "post_date": "09/17/2022 08:53:26",
          "content": "<p>My apology for the late response. Thank you very much for your help!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1893789": "What is out of fold(oof) and 1 fold prediction? I know K-fold cross validation and leave-one-out cross validation. But the two terminologies a lot used in Kaggle are not something that I'm familiar with. Could you please help me understand the concepts of the terminologies by giving me source to read or explaining them?",
    "1894876": "I'm not quite sure what you mean by 1 fold prediction but I'll have a go at explaining the out of fold prediction (though others may want to correct me if I'm mistaken). It's maybe best using an example to bring this to life:\nImagine a dataset of 500 rows where you try to predict an individuals salary in $.\nYou decide to apply 10 fold cross validation. This means every fold will contain 50 rows.\nIn the first iteration you will train a model on 450 rows (9*50) and make predictions on the final fold of 50 rows (the hold out).\nYou will then move onto the next fold of 450 rows and a set of predictions on a different 50 rows.\nBy the end of the cross validation you have 10 lots of predictions for 50 rows. This is the same size as your starting dataset (50*10 = 500)\n**These 500 predicted rows are the out of fold predictions** and could be compared to the known values for each row to calculate an error term. E.g. first row has a known salary of $15,000 but when this row formed part of the holdout it gave a prediction of $17,000 \n\n[This link](https://stackoverflow.com/questions/52396191/what-is-oof-approach-in-machine-learning) might help.",
    "1895772": "Hey)\n\n**OOF** is a Out Of fold (predictions) \n[Link](https://machinelearningmastery.com/out-of-fold-predictions-in-machine-learning/) for more information\n\n**1** **fold** is one of k-folder\nIn K-Fold cross validation method, we divide the data in K folds. Then we use K-1 folds for training it and evaluate/test it on the 1 fold and then repeat it K times with unique fold for evaluating in each iteration.\nNice [tutorial](https://www.kaggle.com/code/satishgunjal/tutorial-k-fold-cross-validation) about it and [link](https://www.analyticsvidhya.com/blog/2022/02/k-fold-cross-validation-technique-and-its-essentials/)\n\n*Good luck* :D",
    "1943056": "My apology for the late response. Thank you very much for your help!",
    "1943057": "My apology for the late response. Thank you very much for the example and explanation!"
  },
  "source": "meta"
}