详细内容或原文请订阅后点击阅览
您会发现泄漏吗?数据科学挑战
当模型飞得太高时:通过数据泄漏的危险旅程,您会发现泄漏吗?数据科学挑战首先出现在数据科学方面。
来源:走向数据科学另一种说明
您可能已经听说过数据泄漏,并且您可能会很好地知道两种口味:目标变量和火车测试拆分。但是,您会在我的故障逻辑或我乐观的代码中的监督中发现漏洞吗?让我们找出答案。
目标变量 火车测试拆分我看过许多有关数据泄漏的文章,我认为它们都是非常有见地的。但是,我确实注意到他们倾向于专注于理论方面。而且我发现他们在某种程度上缺乏示例,这些示例在代码或确切决策的行为中零,导致过度乐观的模型。
我在本文中的目标不是理论上的目标。这是为了真正将您的数据科学技能进行测试。要查看您是否可以发现所有决定,我会在现实世界中示例中导致数据泄漏。
末端的解决方案
可选评论
可选1。目标(标签)泄漏
功能包含有关您要预测的信息时。
当功能包含有关您要预测的信息时- Direct Leakage: Features computed directly from the target → Example: Using “days overdue” to predict loan default → Fix: Remove feature.Indirect Leakage: Features that serve as proxies for the target → Example: Using “insurance payout amount” to predict hospital readmission → Fix: Remove feature.Post-Event Aggregates: Using data from after the prediction point → Example: Including “total calls in first 30 days” for a 7-day churn model → Fix计算苍蝇的骨料