605. Enefit - Predict Energy Behavior of Prosumers | predict-energy-behavior-of-prosumers
首先,感谢本次比赛的举办方和Kaggle提供如此精彩的挑战。下面是我们与 @sercanyesiloz 共同研发的解决方案概述,该方案在三个月的时间里保持稳健。我们在全球公开排名中约位于第150名,随后在第一、第二次更新中分别提升至第45名和第30名,最终在最后一次更新后获得第37名。
我们使用最近三个月的数据作为交叉验证(CV)设置。提交阶段则使用全部可用数据。
我们在比赛中加入了对模型提升最显著的新特征,下面是主要特征列表及实现代码:
week, quarteris_morning(6–11), is_midday(12–15), is_afternoon(16–19), is_evening(20–23), is_night(0–5)is_month_start, is_month_endsin(month), cos(month)wind_magnitude = sqrt(u² + v²)shortwave_radiation / surface_pressureproduction_target = installed_capacity * surface_solar_radiation_downwards / (temperature + 273.15)wind_magnitude 特征源自博客 Wind UV Components。
["week", "quarter"]
is_morning=pl.col("hour").is_in([6, 7, 8, 9, 10, 11]),
is_midday=pl.col("hour").is_in([12, 13, 14, 15]),
is_afternoon=pl.col("hour").is_in([16, 17, 18, 19]),
is_evening=pl.col("hour").is_in([20, 21, 22, 23]),
is_night=pl.col("hour").is_in([0, 1, 2, 3, 4, 5]),
pl.when(pl.col("datetime").dt.month_start() == pl.col("datetime")).then(1).otherwise(0).alias("is_month_start"),
pl.when(pl.col("datetime").dt.month_end() == pl.col("datetime")).then(1).otherwise(0).alias("is_month_end"),
["sin(month)", "cos(month)"]
df["wind_magnitude"] = np.sqrt((df["10_metre_u_wind_component"] ** 2) + (df["10_metre_v_wind_component"] ** 2))
df["shortwave_radiation/surface_pressure"] = df["shortwave_radiation"] / df["surface_pressure"]
df["production_target"] = df["installed_capacity"] * df["surface_solar_radiation_downwards"] / (df["temperature"] + 273.15)
我们解决方案的第二个关键点是模型集成。我们将 LGBM 与 神经网络 结合。尽管神经网络在公开榜单上的分数比单独的 LGBM 低约 3‑4%,但它在最终得分上带来了显著的提升。下图展示了加入神经网络后的集成效果:
第一张图表为仅使用 LGBM 并每 31 天重新拟合的模型。
我们对重新拟合策略并不完全确定,因此保留了不做重新拟合的集成提交(它始终表现更佳)。实验表明,重新拟合可以带来约 1% 的总体提升,如果采用该策略,排名有望进入前 25 名。
我们使用 target 以及 target_diff = target - target_48h 作为预测目标。target / installed capacity 目标在我们的实验中并未取得效果,虽然其他方案声称它有一定帮助。
我们参考了 @vitalykudelya 的 Notebook 作为起点。