{
  "id": 415138,
  "title": "Not overfitted?",
  "url": "/competitions/digit-recognizer/discussion/415138",
  "author_name": "Sai pavan",
  "post_date": "2023-06-05T10:13:25.825000",
  "votes": 1,
  "comment_count": 2,
  "views": null,
  "content": "<p>I am getting mean accuracy score of about 98% just on training data. Doesn't that mean we are overfitting?</p>\n<p>If we think i am overfitting, I shouldn't have got high accuracy score of 97.7% percent(result) on test data after submission</p>\n<p>Doesn't high accuracy score(like 98%) on training data represents the model is overfitting the targets data all the time?</p>\n<p>Why is this?</p>",
  "messages": [
    {
      "id": 2326875,
      "postDate": "2023-07-02T13:16:00.190Z",
      "content": "<p>After solving some problems, and I have revisited to this question, I have realized that inorder to know whether we are overfitting, <br>\nwe would divide the training  set into new training set (part of training set with 80% of original training data)and Validation set(with 20% original training data) so that we would know labels of  new data through which we can easily cross-validate our trained model.</p>\n<p>Another misconception I had was that, having more accuracy on training data is overfitting. But I have realized that,<br>\nif model performance is lower on validation data than it did on training data. Then we can call it overfitting.</p>\n<p>Hope this helps for someone!😁</p>",
      "rawMarkdown": "After solving some problems, and I have revisited to this question, I have realized that inorder to know whether we are overfitting, \nwe would divide the training  set into new training set (part of training set with 80% of original training data)and Validation set(with 20% original training data) so that we would know labels of  new data through which we can easily cross-validate our trained model.\n\nAnother misconception I had was that, having more accuracy on training data is overfitting. But I have realized that,\nif model performance is lower on validation data than it did on training data. Then we can call it overfitting.\n\nHope this helps for someone!😁",
      "votes": 1
    },
    {
      "id": 2288317,
      "postDate": "2023-06-05T10:13:25.827Z",
      "content": "<p>I am getting mean accuracy score of about 98% just on training data. Doesn't that mean we are overfitting?</p>\n<p>If we think i am overfitting, I shouldn't have got high accuracy score of 97.7% percent(result) on test data after submission</p>\n<p>Doesn't high accuracy score(like 98%) on training data represents the model is overfitting the targets data all the time?</p>\n<p>Why is this?</p>",
      "rawMarkdown": "I am getting mean accuracy score of about 98% just on training data. Doesn't that mean we are overfitting?\n\nIf we think i am overfitting, I shouldn't have got high accuracy score of 97.7% percent(result) on test data after submission\n\nDoesn't high accuracy score(like 98%) on training data represents the model is overfitting the targets data all the time?\n\nWhy is this?",
      "votes": 1
    },
    {
      "id": 2512674,
      "postDate": "2023-11-04T18:52:55.013Z",
      "content": "<p>Thank you; it helps. But ,Even after splitting the data, which is a must, when fitting the model using <strong>the technique of data augmentation</strong> (CNN algorithm) to avoid overfitting, the performance of the model in the first epoch begins with 'loss: 0.0459 - accuracy: 0.9862 - val_loss: 0.0263 - val_accuracy: 0.9923 - 139s/epoch.' Is this a sign of overfitting or does it depend on the amount of data used? Because even on the validation data, the performance is high.</p>",
      "rawMarkdown": "Thank you; it helps. But ,Even after splitting the data, which is a must, when fitting the model using **the technique of data augmentation** (CNN algorithm) to avoid overfitting, the performance of the model in the first epoch begins with 'loss: 0.0459 - accuracy: 0.9862 - val_loss: 0.0263 - val_accuracy: 0.9923 - 139s/epoch.' Is this a sign of overfitting or does it depend on the amount of data used? Because even on the validation data, the performance is high."
    }
  ],
  "comments": [
    {
      "id": 2326875,
      "author_name": "Sai pavan",
      "author_url": "",
      "post_date": "2023-07-02T13:16:00.190000",
      "content": "<p>After solving some problems, and I have revisited to this question, I have realized that inorder to know whether we are overfitting, <br>\nwe would divide the training  set into new training set (part of training set with 80% of original training data)and Validation set(with 20% original training data) so that we would know labels of  new data through which we can easily cross-validate our trained model.</p>\n<p>Another misconception I had was that, having more accuracy on training data is overfitting. But I have realized that,<br>\nif model performance is lower on validation data than it did on training data. Then we can call it overfitting.</p>\n<p>Hope this helps for someone!😁</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2512674,
      "author_name": "YMack",
      "author_url": "",
      "post_date": "2023-11-04T18:52:55.013000",
      "content": "<p>Thank you; it helps. But ,Even after splitting the data, which is a must, when fitting the model using <strong>the technique of data augmentation</strong> (CNN algorithm) to avoid overfitting, the performance of the model in the first epoch begins with 'loss: 0.0459 - accuracy: 0.9862 - val_loss: 0.0263 - val_accuracy: 0.9923 - 139s/epoch.' Is this a sign of overfitting or does it depend on the amount of data used? Because even on the validation data, the performance is high.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2326875": "After solving some problems, and I have revisited to this question, I have realized that inorder to know whether we are overfitting, \nwe would divide the training  set into new training set (part of training set with 80% of original training data)and Validation set(with 20% original training data) so that we would know labels of  new data through which we can easily cross-validate our trained model.\n\nAnother misconception I had was that, having more accuracy on training data is overfitting. But I have realized that,\nif model performance is lower on validation data than it did on training data. Then we can call it overfitting.\n\nHope this helps for someone!😁",
    "2288317": "I am getting mean accuracy score of about 98% just on training data. Doesn't that mean we are overfitting?\n\nIf we think i am overfitting, I shouldn't have got high accuracy score of 97.7% percent(result) on test data after submission\n\nDoesn't high accuracy score(like 98%) on training data represents the model is overfitting the targets data all the time?\n\nWhy is this?",
    "2512674": "Thank you; it helps. But ,Even after splitting the data, which is a must, when fitting the model using **the technique of data augmentation** (CNN algorithm) to avoid overfitting, the performance of the model in the first epoch begins with 'loss: 0.0459 - accuracy: 0.9862 - val_loss: 0.0263 - val_accuracy: 0.9923 - 139s/epoch.' Is this a sign of overfitting or does it depend on the amount of data used? Because even on the validation data, the performance is high."
  }
}