{
  "id": 302789,
  "title": "Should I train model in submission notebook?",
  "url": "/competitions/g-research-crypto-forecasting/discussion/302789",
  "author_name": "",
  "post_date": "2022-01-24T09:47:58.131573300Z",
  "votes": 6,
  "comment_count": 5,
  "views": 0,
  "content": "<p>I am new to code competetion. <br>\nCan anyone being so kind to answer me this boring question?<br>\nIn the notebook that I submit , do I need to initiate the model and train it using training data and then  predict through the kaggle API? <br>\nOr I just trained the model before deadline and save it to the directory. In the submission notebook, I just need to load the trained model and make prediction? </p>",
  "messages": [
    {
      "id": "1662469",
      "postDate": "01/24/2022 09:47:58",
      "content": "<p>I am new to code competetion. <br>\nCan anyone being so kind to answer me this boring question?<br>\nIn the notebook that I submit , do I need to initiate the model and train it using training data and then  predict through the kaggle API? <br>\nOr I just trained the model before deadline and save it to the directory. In the submission notebook, I just need to load the trained model and make prediction? </p>",
      "rawMarkdown": "I am new to code competetion. \nCan anyone being so kind to answer me this boring question?\nIn the notebook that I submit , do I need to initiate the model and train it using training data and then  predict through the kaggle API? \nOr I just trained the model before deadline and save it to the directory. In the submission notebook, I just need to load the trained model and make prediction?",
      "votes": null
    },
    {
      "id": "1662496",
      "postDate": "01/24/2022 10:12:49",
      "content": "<p>You can train your model in the submission notebook, but it's not a best practice. You just asked to perform an inference on a test set. Following that approach, you will be able to run much bigger models (because you will not waste a time for training)</p>",
      "rawMarkdown": "You can train your model in the submission notebook, but it's not a best practice. You just asked to perform an inference on a test set. Following that approach, you will be able to run much bigger models (because you will not waste a time for training)",
      "votes": null
    },
    {
      "id": "1663095",
      "postDate": "01/24/2022 19:28:59",
      "content": "<p>Yes, you can just load models and make predictions.</p>",
      "rawMarkdown": "Yes, you can just load models and make predictions.",
      "votes": null
    },
    {
      "id": "1663396",
      "postDate": "01/25/2022 04:03:10",
      "content": "<p>Many people will test and develop in a separate notebook, save and export the model. It's a really nice way of being able to publish your \"competition code\" without actually giving away your bread-and-butter work. It, of course, is up to you how you'd like to handle it.</p>",
      "rawMarkdown": "Many people will test and develop in a separate notebook, save and export the model. It's a really nice way of being able to publish your \"competition code\" without actually giving away your bread-and-butter work. It, of course, is up to you how you'd like to handle it.",
      "votes": null
    },
    {
      "id": "1663405",
      "postDate": "01/25/2022 04:19:00",
      "content": "<p>Hi Bo Yi, even I'm new here. Initialize the model, train it using the train data and predict the test data using the model trained.<br>\nExample:<br>\nX refers to predictors and y is the target variable(survived in titanic dataset).</p>\n<p>lgt_model=LogisticRegression(max_iter=10000,n_jobs=2,random_state=1)<br>\nlgt_model.fit(X, y)<br>\npredictions = lgt_model.predict(X_test)</p>\n<p>Hope it helps!</p>",
      "rawMarkdown": "Hi Bo Yi, even I'm new here. Initialize the model, train it using the train data and predict the test data using the model trained.\nExample:\nX refers to predictors and y is the target variable(survived in titanic dataset).\n\nlgt_model=LogisticRegression(max_iter=10000,n_jobs=2,random_state=1)\nlgt_model.fit(X, y)\npredictions = lgt_model.predict(X_test)\n\nHope it helps!",
      "votes": null
    },
    {
      "id": "1664106",
      "postDate": "01/25/2022 17:45:16",
      "content": "<p>If you are running a DNN or similar model, like LTSM it is unlikely that you will have enough time to train and iterate through the API, if you are running a DT routine like Light gbm or XG Boost you should be ok</p>",
      "rawMarkdown": "If you are running a DNN or similar model, like LTSM it is unlikely that you will have enough time to train and iterate through the API, if you are running a DT routine like Light gbm or XG Boost you should be ok",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1662496,
      "author_name": "meowmeowmeowmeowmeow",
      "author_url": "",
      "post_date": "01/24/2022 10:12:49",
      "content": "<p>You can train your model in the submission notebook, but it's not a best practice. You just asked to perform an inference on a test set. Following that approach, you will be able to run much bigger models (because you will not waste a time for training)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1663095,
      "author_name": "chrisrichardmiles",
      "author_url": "",
      "post_date": "01/24/2022 19:28:59",
      "content": "<p>Yes, you can just load models and make predictions.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1663396,
      "author_name": "jbruntri16",
      "author_url": "",
      "post_date": "01/25/2022 04:03:10",
      "content": "<p>Many people will test and develop in a separate notebook, save and export the model. It's a really nice way of being able to publish your \"competition code\" without actually giving away your bread-and-butter work. It, of course, is up to you how you'd like to handle it.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1663405,
      "author_name": "rifazks",
      "author_url": "",
      "post_date": "01/25/2022 04:19:00",
      "content": "<p>Hi Bo Yi, even I'm new here. Initialize the model, train it using the train data and predict the test data using the model trained.<br>\nExample:<br>\nX refers to predictors and y is the target variable(survived in titanic dataset).</p>\n<p>lgt_model=LogisticRegression(max_iter=10000,n_jobs=2,random_state=1)<br>\nlgt_model.fit(X, y)<br>\npredictions = lgt_model.predict(X_test)</p>\n<p>Hope it helps!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1664106,
      "author_name": "jonnydossantos",
      "author_url": "",
      "post_date": "01/25/2022 17:45:16",
      "content": "<p>If you are running a DNN or similar model, like LTSM it is unlikely that you will have enough time to train and iterate through the API, if you are running a DT routine like Light gbm or XG Boost you should be ok</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1662469": "I am new to code competetion. \nCan anyone being so kind to answer me this boring question?\nIn the notebook that I submit , do I need to initiate the model and train it using training data and then  predict through the kaggle API? \nOr I just trained the model before deadline and save it to the directory. In the submission notebook, I just need to load the trained model and make prediction?",
    "1662496": "You can train your model in the submission notebook, but it's not a best practice. You just asked to perform an inference on a test set. Following that approach, you will be able to run much bigger models (because you will not waste a time for training)",
    "1663095": "Yes, you can just load models and make predictions.",
    "1663396": "Many people will test and develop in a separate notebook, save and export the model. It's a really nice way of being able to publish your \"competition code\" without actually giving away your bread-and-butter work. It, of course, is up to you how you'd like to handle it.",
    "1663405": "Hi Bo Yi, even I'm new here. Initialize the model, train it using the train data and predict the test data using the model trained.\nExample:\nX refers to predictors and y is the target variable(survived in titanic dataset).\n\nlgt_model=LogisticRegression(max_iter=10000,n_jobs=2,random_state=1)\nlgt_model.fit(X, y)\npredictions = lgt_model.predict(X_test)\n\nHope it helps!",
    "1664106": "If you are running a DNN or similar model, like LTSM it is unlikely that you will have enough time to train and iterate through the API, if you are running a DT routine like Light gbm or XG Boost you should be ok"
  },
  "source": "meta"
}