{
  "id": 475123,
  "title": "Beware of using date-based features",
  "url": "/competitions/home-credit-credit-risk-model-stability/discussion/475123",
  "author_name": "narsil (jobs-in-data.com)",
  "post_date": "2024-02-07T07:15:19.088000",
  "votes": 14,
  "comment_count": 0,
  "views": 0,
  "content": "<p>The date is a proxy for the LGBM model for the state of the world at the moment of credit decision, in particular the state of the economy, which has a great impact on default rates. Including this feature improves the training score by 0.03 AUC in my case.</p>\n<p>However, if the data in the hidden test is in the future relative to the train, then all your observations will be predicted as if they happened on the last day of the train set.</p>\n<p>If we wanted to use date-based features properly, we would have to predict the state of the economy in the future (GDP growth, consumption, etc.)</p>\n<p>UPDATE: Having thought about the metric, what I wrote above does not make sense actually. Gini scores are calculated on a weekly basis, so all of the loans have the same state of economy as a context.</p>",
  "messages": [
    {
      "id": 2640949,
      "postDate": "2024-02-07T07:15:19.087Z",
      "content": "<p>The date is a proxy for the LGBM model for the state of the world at the moment of credit decision, in particular the state of the economy, which has a great impact on default rates. Including this feature improves the training score by 0.03 AUC in my case.</p>\n<p>However, if the data in the hidden test is in the future relative to the train, then all your observations will be predicted as if they happened on the last day of the train set.</p>\n<p>If we wanted to use date-based features properly, we would have to predict the state of the economy in the future (GDP growth, consumption, etc.)</p>\n<p>UPDATE: Having thought about the metric, what I wrote above does not make sense actually. Gini scores are calculated on a weekly basis, so all of the loans have the same state of economy as a context.</p>",
      "rawMarkdown": "The date is a proxy for the LGBM model for the state of the world at the moment of credit decision, in particular the state of the economy, which has a great impact on default rates. Including this feature improves the training score by 0.03 AUC in my case.\n\nHowever, if the data in the hidden test is in the future relative to the train, then all your observations will be predicted as if they happened on the last day of the train set.\n\nIf we wanted to use date-based features properly, we would have to predict the state of the economy in the future (GDP growth, consumption, etc.)\n\nUPDATE: Having thought about the metric, what I wrote above does not make sense actually. Gini scores are calculated on a weekly basis, so all of the loans have the same state of economy as a context.",
      "votes": 14
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2640949": "The date is a proxy for the LGBM model for the state of the world at the moment of credit decision, in particular the state of the economy, which has a great impact on default rates. Including this feature improves the training score by 0.03 AUC in my case.\n\nHowever, if the data in the hidden test is in the future relative to the train, then all your observations will be predicted as if they happened on the last day of the train set.\n\nIf we wanted to use date-based features properly, we would have to predict the state of the economy in the future (GDP growth, consumption, etc.)\n\nUPDATE: Having thought about the metric, what I wrote above does not make sense actually. Gini scores are calculated on a weekly basis, so all of the loans have the same state of economy as a context."
  }
}