refer to:  https://www.kaggle.com/dansbecker/data-leakage

There are two main types of leakage: Leaky Predictors and a Leaky Validation Strategies.

This occurs when your predictors include data that will not be available at the time you make predictions.

模型中用了预测前不可用的feature/data,这会导致在validation中accuracy很高,而在实际环境中部署后,accuracy很低,因为得不到这样的数据。

如,预测肺炎,如果使用“服用抗生素”作为feature,就是这种情况,因为一般是得了肺炎自然会服用抗生素,在预测肺炎这格模型中,不应该使用“服用抗生素”这个feature。

Leaky Validation Strategies

在模型处理过程中,让Validation Data影响到了模型的参数。

For example, this happens if you run preprocessing (like fitting the Imputer for missing values) before calling train_test_split.

例如,当你在调用train_test_split之前,对数据进行了预处理(如Imputer),而预处理所用数据包含了spit之后的validation data。

相关文章:

  • 2021-10-01
  • 2022-01-20
  • 2021-06-06
  • 2022-02-12
  • 2021-09-30
  • 2022-02-10
  • 2021-07-20
  • 2021-11-27
猜你喜欢
  • 2021-09-30
  • 2022-12-23
  • 2021-07-13
  • 2021-11-29
  • 2021-10-21
  • 2021-09-23
  • 2022-12-23
相关资源
相似解决方案