{
  "id": 53283,
  "title": "Getting reproducible results with LGBM",
  "url": "/competitions/talkingdata-adtracking-fraud-detection/discussion/53283",
  "author_name": "",
  "post_date": "2018-03-29T00:31:02.075599500Z",
  "votes": null,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Is it possible to get reproducible results with LGBM in Python with a CPU? I looked at the list of parameters and there doesn't seem to be a 'random_state' or 'seed' parameter like there is for XGBoost.</p>\n\n<p>I noticed there is a 'random_state' parameter for the sklearn wrapper for LGBM though - has anyone tried that? And will the prediction results be the same as regular LGBM?</p>",
  "messages": [
    {
      "id": "305496",
      "postDate": "03/29/2018 00:31:02",
      "content": "<p>Is it possible to get reproducible results with LGBM in Python with a CPU? I looked at the list of parameters and there doesn't seem to be a 'random_state' or 'seed' parameter like there is for XGBoost.</p>\n\n<p>I noticed there is a 'random_state' parameter for the sklearn wrapper for LGBM though - has anyone tried that? And will the prediction results be the same as regular LGBM?</p>",
      "rawMarkdown": "Is it possible to get reproducible results with LGBM in Python with a CPU? I looked at the list of parameters and there doesn't seem to be a 'random_state' or 'seed' parameter like there is for XGBoost.\n\nI noticed there is a 'random_state' parameter for the sklearn wrapper for LGBM though - has anyone tried that? And will the prediction results be the same as regular LGBM?",
      "votes": null
    },
    {
      "id": "305508",
      "postDate": "03/29/2018 01:00:45",
      "content": "<p>It does have a 'seed' parameter. Try it out!</p>",
      "rawMarkdown": "It does have a 'seed' parameter. Try it out!",
      "votes": null
    },
    {
      "id": "305509",
      "postDate": "03/29/2018 01:06:41",
      "content": "<p>Unfortunately no. Good discussion <a href=\"https://www.kaggle.com/c/zillow-prize-1/discussion/33719\">here</a> regarding reasons.</p>",
      "rawMarkdown": "Unfortunately no. Good discussion [here][1] regarding reasons.\n\n\n  [1]: https://www.kaggle.com/c/zillow-prize-1/discussion/33719",
      "votes": null
    },
    {
      "id": "305592",
      "postDate": "03/29/2018 05:49:07",
      "content": "<p>Depends, so far in the same local machine result always the same. (use the same number of tread) </p>",
      "rawMarkdown": "Depends, so far in the same local machine result always the same. (use the same number of tread)",
      "votes": null
    },
    {
      "id": "305649",
      "postDate": "03/29/2018 08:01:43",
      "content": "<p>There are seeds in lightgbm, including <code>feature_fraction_seed</code>, <code>bagging_seed</code>, and others.  Just search for <code>seed</code> in the parameter documentation.</p>\n\n<p>Another source of randomness is the folds you use if you use k fold cross validation.  Make sure you use the same seed or same random state each time.  And if you use the sklearn wrapper set the random state indeed.</p>",
      "rawMarkdown": "There are seeds in lightgbm, including `feature_fraction_seed`, `bagging_seed`, and others.  Just search for `seed` in the parameter documentation.\n\nAnother source of randomness is the folds you use if you use k fold cross validation.  Make sure you use the same seed or same random state each time.  And if you use the sklearn wrapper set the random state indeed.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 305508,
      "author_name": "michaelsnell",
      "author_url": "",
      "post_date": "03/29/2018 01:00:45",
      "content": "<p>It does have a 'seed' parameter. Try it out!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 305509,
      "author_name": "pranav84",
      "author_url": "",
      "post_date": "03/29/2018 01:06:41",
      "content": "<p>Unfortunately no. Good discussion <a href=\"https://www.kaggle.com/c/zillow-prize-1/discussion/33719\">here</a> regarding reasons.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 305592,
      "author_name": "muhammadalfiansyah",
      "author_url": "",
      "post_date": "03/29/2018 05:49:07",
      "content": "<p>Depends, so far in the same local machine result always the same. (use the same number of tread) </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 305649,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "03/29/2018 08:01:43",
      "content": "<p>There are seeds in lightgbm, including <code>feature_fraction_seed</code>, <code>bagging_seed</code>, and others.  Just search for <code>seed</code> in the parameter documentation.</p>\n\n<p>Another source of randomness is the folds you use if you use k fold cross validation.  Make sure you use the same seed or same random state each time.  And if you use the sklearn wrapper set the random state indeed.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "305496": "Is it possible to get reproducible results with LGBM in Python with a CPU? I looked at the list of parameters and there doesn't seem to be a 'random_state' or 'seed' parameter like there is for XGBoost.\n\nI noticed there is a 'random_state' parameter for the sklearn wrapper for LGBM though - has anyone tried that? And will the prediction results be the same as regular LGBM?",
    "305508": "It does have a 'seed' parameter. Try it out!",
    "305509": "Unfortunately no. Good discussion [here][1] regarding reasons.\n\n\n  [1]: https://www.kaggle.com/c/zillow-prize-1/discussion/33719",
    "305592": "Depends, so far in the same local machine result always the same. (use the same number of tread)",
    "305649": "There are seeds in lightgbm, including `feature_fraction_seed`, `bagging_seed`, and others.  Just search for `seed` in the parameter documentation.\n\nAnother source of randomness is the folds you use if you use k fold cross validation.  Make sure you use the same seed or same random state each time.  And if you use the sklearn wrapper set the random state indeed."
  },
  "source": "meta"
}