{
  "id": 551677,
  "title": "For a NN model, if I train it with all data, how do I set the training epoch?",
  "url": "/competitions/jane-street-real-time-market-data-forecasting/discussion/551677",
  "author_name": "",
  "post_date": "2024-12-14T16:41:55.889104500Z",
  "votes": 2,
  "comment_count": 5,
  "views": 0,
  "content": "<p>There is no validation set for early stopping</p>",
  "messages": [
    {
      "id": "3072069",
      "postDate": "12/14/2024 16:41:55",
      "content": "<p>There is no validation set for early stopping</p>",
      "rawMarkdown": "There is no validation set for early stopping",
      "votes": null
    },
    {
      "id": "3072093",
      "postDate": "12/14/2024 17:20:45",
      "content": "<p>You can choose a high enough epoch number (e.g. 100) and use modules (e.g. <a href=\"https://pytorch.org/ignite/generated/ignite.handlers.early_stopping.EarlyStopping.html\" target=\"_blank\">EarlyStopping </a> in PyTorch) to monitor the training loss for early stopping. </p>",
      "rawMarkdown": "You can choose a high enough epoch number (e.g. 100) and use modules (e.g. [EarlyStopping ](https://pytorch.org/ignite/generated/ignite.handlers.early_stopping.EarlyStopping.html) in PyTorch) to monitor the training loss for early stopping.",
      "votes": null
    },
    {
      "id": "3072152",
      "postDate": "12/14/2024 19:05:15",
      "content": "<p>If you don’t have a validation set for early stopping, you can set the training epochs using the following strategies:<br>\n1️⃣ Monitor Training Loss: Observe the training loss and stop when it plateaus or starts to overfit (loss decreases too slowly).<br>\n2️⃣ Cross-Validation: Split your data into k-folds and validate on different subsets to estimate the best epoch.<br>\n3️⃣ Use a Predefined Epoch Range: Start with a conservative number of epochs (e.g., 50–100) and analyze performance.<br>\n4️⃣ Manually Inspect Results: Train for a higher number of epochs, save checkpoints, and analyze the model’s performance over time.</p>\n<p>Using any of these techniques can help ensure the model generalizes well without relying on early stopping.</p>",
      "rawMarkdown": "If you don’t have a validation set for early stopping, you can set the training epochs using the following strategies:\n1️⃣ Monitor Training Loss: Observe the training loss and stop when it plateaus or starts to overfit (loss decreases too slowly).\n2️⃣ Cross-Validation: Split your data into k-folds and validate on different subsets to estimate the best epoch.\n3️⃣ Use a Predefined Epoch Range: Start with a conservative number of epochs (e.g., 50–100) and analyze performance.\n4️⃣ Manually Inspect Results: Train for a higher number of epochs, save checkpoints, and analyze the model’s performance over time.\n\nUsing any of these techniques can help ensure the model generalizes well without relying on early stopping.",
      "votes": null
    },
    {
      "id": "3072340",
      "postDate": "12/15/2024 03:51:15",
      "content": "<p>Are there risks of overfitting if I just monitor the training loss for early stopping?</p>",
      "rawMarkdown": "Are there risks of overfitting if I just monitor the training loss for early stopping?",
      "votes": null
    },
    {
      "id": "3072670",
      "postDate": "12/15/2024 14:25:33",
      "content": "<p>Yes! It's hard to avoid overfitting without CV.</p>",
      "rawMarkdown": "Yes! It's hard to avoid overfitting without CV.",
      "votes": null
    },
    {
      "id": "3073992",
      "postDate": "12/17/2024 07:36:38",
      "content": "<p>come on bro</p>",
      "rawMarkdown": "come on bro",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3072093,
      "author_name": "shanyun",
      "author_url": "",
      "post_date": "12/14/2024 17:20:45",
      "content": "<p>You can choose a high enough epoch number (e.g. 100) and use modules (e.g. <a href=\"https://pytorch.org/ignite/generated/ignite.handlers.early_stopping.EarlyStopping.html\" target=\"_blank\">EarlyStopping </a> in PyTorch) to monitor the training loss for early stopping. </p>",
      "votes": null,
      "replies": [
        {
          "id": 3072340,
          "author_name": "i2nfinit3y",
          "author_url": "",
          "post_date": "12/15/2024 03:51:15",
          "content": "<p>Are there risks of overfitting if I just monitor the training loss for early stopping?</p>",
          "votes": null,
          "replies": [
            {
              "id": 3072670,
              "author_name": "shanyun",
              "author_url": "",
              "post_date": "12/15/2024 14:25:33",
              "content": "<p>Yes! It's hard to avoid overfitting without CV.</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3072152,
      "author_name": "thasinkhan",
      "author_url": "",
      "post_date": "12/14/2024 19:05:15",
      "content": "<p>If you don’t have a validation set for early stopping, you can set the training epochs using the following strategies:<br>\n1️⃣ Monitor Training Loss: Observe the training loss and stop when it plateaus or starts to overfit (loss decreases too slowly).<br>\n2️⃣ Cross-Validation: Split your data into k-folds and validate on different subsets to estimate the best epoch.<br>\n3️⃣ Use a Predefined Epoch Range: Start with a conservative number of epochs (e.g., 50–100) and analyze performance.<br>\n4️⃣ Manually Inspect Results: Train for a higher number of epochs, save checkpoints, and analyze the model’s performance over time.</p>\n<p>Using any of these techniques can help ensure the model generalizes well without relying on early stopping.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3073992,
      "author_name": "filaer",
      "author_url": "",
      "post_date": "12/17/2024 07:36:38",
      "content": "<p>come on bro</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3072069": "There is no validation set for early stopping",
    "3072093": "You can choose a high enough epoch number (e.g. 100) and use modules (e.g. [EarlyStopping ](https://pytorch.org/ignite/generated/ignite.handlers.early_stopping.EarlyStopping.html) in PyTorch) to monitor the training loss for early stopping.",
    "3072152": "If you don’t have a validation set for early stopping, you can set the training epochs using the following strategies:\n1️⃣ Monitor Training Loss: Observe the training loss and stop when it plateaus or starts to overfit (loss decreases too slowly).\n2️⃣ Cross-Validation: Split your data into k-folds and validate on different subsets to estimate the best epoch.\n3️⃣ Use a Predefined Epoch Range: Start with a conservative number of epochs (e.g., 50–100) and analyze performance.\n4️⃣ Manually Inspect Results: Train for a higher number of epochs, save checkpoints, and analyze the model’s performance over time.\n\nUsing any of these techniques can help ensure the model generalizes well without relying on early stopping.",
    "3072340": "Are there risks of overfitting if I just monitor the training loss for early stopping?",
    "3072670": "Yes! It's hard to avoid overfitting without CV.",
    "3073992": "come on bro"
  },
  "source": "meta"
}